Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2025-03-28 23:22:09

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

Perpetual upgrade notice on MAMP

Can’t figure this one out. Too many variables to juggle…

  • New laptop with data restored (manually) from TimeMachine by selectively copying folders over because the destination drive was much smaller than the backup. That caused all sorts of ACL/permissions issues so I’ve had to go through and use xattr -cr * to remove the “@’ symbol permissions that prevented me from writing to most files and directories. There may still be some nodes with the wrong owner/group and I’m chasing those down as I find them.
  • New version of MAMP installed so it’s using PHP 8/MySQL 8, which is fine but all my old databases are in the mysql57 folder inside /Applications/MAMP/db so I’ll need to get those out at some point and move them to the newer mysql 8 folder.
  • With MAMP started, and using SequelAce connected to localhost, I created a new DB on MySQL 8, utf8mb4_general_ci.
  • Downloaded the client site files to localhost directory.
  • Imported the client database into it no problem.
  • Altered txp_prefs paths and site url value by hand, to point to the installation.
  • Changed config.php accordingly.
  • Connected to the login screen, logged in and everything went boom because of old plugins and Txp 4.8.8 + PHP 8 incompatibility.
  • Overwrote localhost site files with 4.9.0-beta.2 files.
  • Logged in again. Better. Got the green ‘new version installed’ message.
  • Green ‘new version installed’ message now appears on every page as I traverse the admin side. That usually means it can’t complete the upgrade or write to the version string in the prefs table.
  • I can type content (articles, pages, forms, etc) and save stuff no problem.
  • But if I try to do some admin action, like change pagination settings on the Sections panel, the request goes off fine, the expected page content is returned. But if I revisit the panel, the pagination is back to 12. Same with any such AJAX settings, like changing the column sort order on any panel, or saving a Form. The value changes in the database (number of rows to display, last form saved, etc) but on panel visit, the defaults are applied.
  • The Diagnostics panel reports this in debugging mode:
Warning "file(http://localhost:8888/client/5dbc78c763178675e87c1a26b7c160f2/?txpcleantest=1): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
"
in /Users/stef/Documents/development/installations/client/textpattern/include/txp_diag.php at line 395.

So that and the fact it’s perpetually installing are the only clues I have at the moment.

I figured at first it was database write permissions, so I opened them up fully for the ‘root’ user, but it’s writing to the DB fine. So maybe something in the installation process is borked and that’s causing the other knock-on issues? But I’m not getting any errors when I visit any panel, even in debugging mode, and it’s no different on the plugins panel so it’s not a plugin interfering. I turned them all off anyway, just in case.

At this point I’m tempted to just manually adjust the version string in the prefs table to shut it up and see if it starts to work, but I kinda want to know if this is a bug in the 4.9.0 upgrader and I don’t know where to start with so many variables and unknowns. Could be file permissions, database permissions, collation/charset issues, a bug, …

There are a few similar threads dotted about here but none of them seem to offer a solution to this particular variant. Anybody got any clues before I go through the core upgrade script line by line dumping out variables to see where it’s falling over?


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

#2 2025-03-29 09:11:27

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

Re: Perpetual upgrade notice on MAMP

Bloke wrote #339398:

At this point I’m tempted to just manually adjust the version string in the prefs table to shut it up and see if it starts to work …

That’s what I do when that happens. It could be that something in the upgrade/update script that doesn’t work, but it may have to do with the non-release / dev versions. Because I use that routinely, I can’t tell anymore.

The value changes in the database (number of rows to display, last form saved, etc) but on panel visit, the defaults are applied.

That sounds so weird: the values are saved to the db but are not respected by the browser on a later revisit?


TXP Builders – finely-crafted code, design and txp

Offline

#3 2025-03-29 09:38:33

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

Re: Perpetual upgrade notice on MAMP

jakob wrote #339404:

That sounds so weird: the values are saved to the db but are not respected by the browser on a later revisit?

Yep. And that’s the primary motive behind me not just blasting the version string in prefs with the correct value. I can edit a form, save, refresh the prefs in Sequel Ace and see the last used form in there. I refresh the admin panel and it selects the default (and shows me the New Version Installed green message).

Same with pagination and sort order and, well, anything Ajaxy. Except saves. Which are committed and show up as expected in the textareas… even on the Write panel, which is an Ajax save.

Baffling.


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

Board footer

Powered by FluxBB