Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,254
GitHub

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
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,254
GitHub

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: 9,090
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
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: 9,090
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
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: 11,445
Website GitHub

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: 11,445
Website GitHub

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: 3,187
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 ?
Sand space – admin theme for Textpattern

Offline

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

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,254
GitHub

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

#21 2020-02-16 15:30:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

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

Bloke wrote #321683:

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?

Hi Stef, There is a number of article counters. Unfortunately I cannot get a tag trace when the error occurs as it breaks the whole page. The error is the only thing that loads. I’ll investigate further.

> Edit. When <txp:php>echo safe_count('txp_image', "category = 'publications'");</txp:php> is used without the surrounding equals the page does indeed break on the b3 demo site too. The issue is of course minor as the solution is already in the box. I nevertheless hoped that txp’s reaction would not be as radical.

Last edited by colak (2020-02-16 16:21:01)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#22 2020-02-16 16:24:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

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

phiw13 wrote #321685:

Upgrading instructions may need a little tweak.

Yep. When 4.8 is out, we’ll do that.

gaekwad wrote #321686:

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

Definitely. If there’s no JSON support as well, people without that and simplexml are going to struggle. We need to trap those and deal with them as best we can. Thanks for testing.

If I get a chance, I’ll try and trap some of this stuff in a few commits today or tomorrow. If you have time and can rerun some tests in environments without those components, it’d be awesome so we can squash this.


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

#23 2020-02-17 08:56:38

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,254
GitHub

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

Bloke wrote #321688:

If I get a chance, I’ll try and trap some of this stuff in a few commits today or tomorrow. If you have time and can rerun some tests in environments without those components, it’d be awesome so we can squash this.

Yep, happy to.

Offline

#24 2020-02-17 10:47:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

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

Bloke wrote #321684:

My 9000th post, woohoo!

Wow, you are hands down the “Hamilton” or “Liverpool” of Textpattern :-) I think I post a lot and I’m not even half-way behind you*. Props!!

*In fact, I’m currently only just in the top ten according to forum search.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB