Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-02-15 14:57:41

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,137

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

amordecosmos wrote #321676:

Apparently they were not included this time.

I ‘apt-get install php-xml’ and now everything is okay.

Exactly the same issue I had – glad it’s fixed. I don’t know whether DO PHP is just compiled differently, but my gut feeling is XML stuff is not included in PHP 7 like it was with PHP 5.

Offline

#12 2020-02-15 15:14:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,937
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

Given that DO is fairly popular and a generally respected hosting option, might it make sense to trap this error more elegantly? Or allow one to proceed if not vital?


TXP Builders – finely-crafted code, design and txp

Offline

#13 2020-02-15 15:29:35

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,137

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

jakob wrote #321678:

Given that DO is fairly popular and a generally respected hosting option, might it make sense to trap this error more elegantly? Or allow one to proceed if not vital?

There’s this: github.com/textpattern/textpattern/issues/1309

Personally I’m in favour of a sys req check in the initial setup routine, but not sure how best to catch upgrades where the sys reqs have changed on, say, a big jump in Textpattern versions.

Offline

#14 2020-02-15 15:31:21

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,137

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

Follow up: I’ve got a vague memory of all Ubuntu PHP 7.* seemingly being compiled without XML support, presumably with the ready availability of php-xml it’s easy to mitigate. Don’t quote me on this, though.

Edit: yep – I’m not imagining it – here: forum.textpattern.com/viewtopic.php?pid=318130#p318130

Last edited by gaekwad (2020-02-15 15:33:32)

Offline

#15 2020-02-15 17:08:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,271
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

When using

<txp:php>echo safe_count('txp_image', "category = 'publications'");</txp:php>

in an article with textile on, I get the following error, which also prevents the page from loading.

Parse error: syntax error, unexpected '=', expecting ')' in /path/to/textpattern/publish/taghandlers.php(4323) : eval()'d code on line 1

overriding textile

==<txp:php>echo safe_count('txp_image', "category = 'publications'");</txp:php>==

works OK.

I have no worries if this remains as in the b3.:)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#16 2020-02-15 17:26:51

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,271
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

A second issue. When using

<img src="<txp:page_url type="theme_path" />/forms/svg/graphic.svg" alt="my graphic" class="my classes" />

in the write tab, I get a broken image returned. Writing the url, the image loads fine.

> Edited to add that

<img src="<txp:output_form form="graphic.svg" format="flat.url" />" alt="my graphic" class="my classes" />

also works OK but I’m not certain as to how this may affect theme development.

Last edited by colak (2020-02-15 17:41:59)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#17 2020-02-15 21:53:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

colak wrote #321681:

<txp:php>echo safe_count('txp_image', "category = 'publications'");</txp:php>... … prevents the page from loading.

Not on the demo server. If I create that category and randomly assign some of the images to it, I get the correct value returned in the article. Is there something else on the page interfering? Does your source code or tag trace reveal anything?

<img src="<txp:page_url type="theme_path" />/forms/svg/graphic.svg" alt="my graphic" class="my classes" />... in the write tab, I get a broken image returned.

It’s a Textile parsing thing. It’s the same in 4.7.3, not a regression. I also get the same broken output on 4.7.3 and 4.8.0-beta.3 if I use <txp:output_form> as in your second example. It messes the double quotes up. You have to surround it with == to make it work.

This is a prime example why shortcodes are so much better for use in articles than tags in attributes :) Shorter and leaner tags, less prone to breakage, and you can control the output centrally in the Form.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#18 2020-02-15 22:01:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,726
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

jakob wrote #321678:

Given that DO is fairly popular and a generally respected hosting option, might it make sense to trap this error more elegantly? Or allow one to proceed if not vital?

Possibly. We’ll have to see what the fallout is to return nothing from the XML routines if their sys requirements aren’t met. For production usage (i.e. upgrades) I expect the worst case scenario might be that the pophelp topics return nothing when clicked, since they’re read from XML files.

For new installations, well, it’s more vital since default content such as categories and the welcome article and sections and so forth are read from XML files. So, as Pete and Jools say, it makes sense to try and trap that early on. Should be relatively easy to do. Maybe we don’t display the language selector at all. Just the welcome message/header and then an “Unfortunately your system doesn’t meet the base requirements to run Textpattern. Please ensure you enable: blah, blah and blah, then refresh this page.”

That would probably be more useful than a bunch of manky error messages.

We already have an assert_system_requirements() function that runs on:

  • Setup
  • Update

but it only checks the PHP version. We could maybe expand that to include other peripheral functionality that we consider vital.

EDIT: My 9000th post, woohoo!

Last edited by Bloke (2020-02-15 22:12:02)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#19 2020-02-16 12:48:35

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,117
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

Upgrading instructions may need a little tweak, for people who upgrade from a previous 4.8 beta, and in particular for people who run TXP on servers where the /textpattern/plugins folder need special permissions. If that folder already exists, there is no need to overwrite it. This probably would, depending on how the upgrade is performed, erase all its contents (and reset the permissions to the default).

In the future this will apply to everyone who upgrade.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#20 2020-02-16 14:08:12

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,137

Re: Feedback to: Textpattern CMS 4.8.0-beta.3 released

I ran some tests on a Canonical-provided Ubuntu ISO (bionic, 18.04 LTS branch) on a fresh install. Standard setup, with a LAMP stack via the installer, no extra packages from apt, just an apt full-upgrade to get up-to-date.

Findings for current apt PHP (v 7.2.24):

  • There is no SimpleXML support out of the box.
  • There is libxml support (v 2.9.4)
  • There is no is JSON support out of the box.
  • There is mysqli support out of the box.

So we should probably update the sys reqs article to indicate not all PHP installations have all the parts ready to go.

Last edited by gaekwad (2020-02-17 17:50:16)

Offline

Board footer

Powered by FluxBB