Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2020-02-17 11:41:12

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

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

Bloke wrote #321684:

EDIT: My 9000th post, woohoo!

And it’s not just the quantity. It’s the quality too! Way to go.


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

Offline

#26 2020-02-17 15:31:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website 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.

Daft question perhaps. Is there a way of temporarily disabling a library, either via a line in php.ini or by moving/renaming folders in MAMP’s installation path? Just want to ‘disable’ libxml to see what happens but I don’t want to recompile from source or anything that drastic. Wondered if there was a quick hack to nobble the library so that when I restart MAMP it’s not included. Easier to test that way.


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

Online

#27 2020-02-17 15:41:54

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

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

Bloke wrote #321711:

[…] MAMP […]

Doesn’t MAMP use the underlying macOS internals? Please forgive me if this comes over as obnoxious, but surely a VM of a proper hosting environment OS would be more useful? If you combine this with snapshots, it’s relatively quick to purge the system library without knackering the host.

So, in the case of Ubuntu LTS, spin up a VM from the mini.iso netboot image, configure stack(s) to taste in the installer, let it get its stuff, you’re ready to go. Power off, snapshot. Power on, apt purge libxml, power off, snapshot.

Actually, I do sound obnoxious. Ugh.

Offline

#28 2020-02-17 15:59:21

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

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

gaekwad wrote #321712:

Doesn’t MAMP use the underlying macOS internals?

Maybe. I know you can configure which version(s) of PHP are available by hacking the /Applications/MAMP/bin/php directory and ‘commenting out’ versions you don’t want. Since it defaults to the latest two versions of PHP 7 but ships with a bunch of other versions, if you wanted, say, the latest PHP 7 and an older PHP 5.6 to be available, I can just rename all the other dirs, turn off the server, pick the one I want from prefs, and restart the server.

Just wondered if maybe the entire library ecosystem was self-contained in there too and it was possible to use similar trickery to dick around with the filesystem and ‘shut off’ certain components for testing purposes. Or maybe an override in php.ini I didn’t know about, like commenting out a load_module line or adding a disable_module line or something.

I could go the route you suggested and fire up VirtualBox but I’d have to then install Txp in there as well and set up MySQL DBs and such-like. Since I already have all that paraphernalia available on localhost, I was looking for a shortcut! No worries, thanks for the alternative setup ideas.

Last edited by Bloke (2020-02-17 16:02:36)


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

Online

#29 2020-02-17 16:56:46

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

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

gaekwad wrote #321686:

There is no JSON support out of the box.

Wait, so that means the json_encode() function is missing?


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

Online

#30 2020-02-17 16:59:24

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

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

Bloke wrote #321714:

Wait, so that means the json_encode() function is missing?

What can I do here to test that?

Offline

#31 2020-02-17 17:07:06

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

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

gaekwad wrote #321715:

What can I do here to test that?

I think just visiting the Sections panel would do it. That uses json_encode() to handle the multi-edit Change Theme/Page/Style feature so if that function is missing, the page’ll probably blow up. According to the docs, JSON is installed by default in 5.2.0+ so I’d be interested to know which bits aren’t installed in your Canonical environment.


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

Online

#32 2020-02-17 17:17:14

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

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

I’ve added some defensive code around SimpleXML which should at least stop the errors flying, but if you run /setup in such an environment, it’ll not populate any content and your front-end will report Unknown Section. Your pophelp will also either return the name of the field or ‘Help topic not available’ as it won’t be able to load the XML files.

Now, an easier check might be to simply add this as a requirement to the assert_system_requirements() function so it’ll just unceremoniously STOP if you don’t have it installed. That means if you install or upgrade to 4.8.0 and you don’t happen to have it on your server, you’ll get a white screen and message to install it before you can do anything else on the admin side.

What’s everyone’s feeling on this drastic measure versus what I’ve done here?

Last edited by Bloke (2020-02-17 17:18:01)


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

Online

#33 2020-02-17 17:23:03

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

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

Bloke wrote #321716:

I think just visiting the Sections panel would do it. That uses json_encode() to handle the multi-edit Change Theme/Page/Style feature so if that function is missing, the page’ll probably blow up.

Haven’t got Textpattern installed (no XML support, so haven’t tried). Presumably any PHP code using json_encode() would do the trick, right?

Offline

#34 2020-02-17 17:25:50

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

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

gaekwad wrote #321718:

Haven’t got Textpattern installed (no XML support, so haven’t tried). Presumably any PHP code using json_encode() would do the trick, right?

Yep, if that’s one of the functions that’s missing when you reported No JSON support above.

If that function works, but there are other facets of JSON that don’t work, then we might get away with it.


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

Online

#35 2020-02-17 17:40:31

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

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

Bloke wrote #321719:

Yep, if that’s one of the functions that’s missing when you reported No JSON support above.

More testing underway. I’ll report back.

Offline

#36 2020-02-17 17:55:01

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

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

Bloke wrote #321714:

Wait, so that means the json_encode() function is missing?

I was wrong – rechecked and it’s there. No idea how that slipped through – sorry about that. The command line php -i doesn’t seem to tally with the phpinfo() output.

Screengrab of phpinfo(): i.imgur.com/u1GBCCw.png (warning: is long)

SimpleXML does not appear in phpinfo().

Edit: running apt install php-xml adds SimpleXML support.

Last edited by gaekwad (2020-02-17 17:58:37)

Offline

Board footer

Powered by FluxBB