Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2018-05-16 14:17:08

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

Re: Two issues with 4.7.0

PS: the only time I’ve ever encountered UnexpectedValueException stuff it was a) Laravel-related and b) permissions solved it.

Offline

#32 2018-05-16 14:29:45

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

Hey all,
I don’t use specific overrides when FTP’ing with Fetch. The textpattern/vendors/Textpattern/Iterator/RecDirIterator.php e.g. has 644.

jakob wrote #311846:

Also, do you have any plugins loading from the plugin_cache directory? (I can’t remember if they’re reported in diagnostics).

Jakob, no, nothing that I would be aware of.

Offline

#33 2018-05-16 14:33:18

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

Re: Two issues with 4.7.0

funtoosh wrote #311848:

I don’t use specific overrides when FTP’ing with Fetch. The textpattern/vendors/Textpattern/Iterator/RecDirIterator.php e.g. has 644.

644 means nobody has execute rights, which is possibly a factor in the permissions error.

Try this – set file and directory permissions to 755 on upload instead of 644, so the web server user can do its work.

Last edited by gaekwad (2018-05-16 14:33:26)

Offline

#34 2018-05-16 14:51:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,437
Website GitHub

Re: Two issues with 4.7.0

644 is fine for the PHP files – but the directories themselves usually need 755 – or at least the relevant execute permission and a user:group that the web server can use, as you say.

If I manually hack my textpattern/vendors/Textpattern/Iterator directory to have 644 permissions, I only get the expected Fatal error: Class 'Textpattern\Iterator\RecDirIterator' not found – not the UnexpectedValueException.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#35 2018-05-16 14:58:37

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

Yeah, that’s not the culprit, my textpattern/vendors/Textpattern/Iterator is 755 …

Offline

#36 2018-05-16 15:00:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,437
Website GitHub

Re: Two issues with 4.7.0

And PHP says:

Throws an UnexpectedValueException if the path cannot be found or is not a directory.

EDIT: And in the case of the RecursiveIteratorIterator, one of the user comments states:

if there is a directory contained within the directory you are searching in that you have no access to read an UnexpectedValueException will be thrown (leaving you with an empty list).

This just gets weirder.

Last edited by Bloke (2018-05-16 15:02:19)


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#37 2018-05-16 15:04:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,437
Website GitHub

Re: Two issues with 4.7.0

Ah, bingo!

If you set one of the theme directories within the themes directory itself with permissions that are not readable by the web server, you do indeed get UnexpectedValueException. So it is the (stupidly named, imo) RecursiveIteratorIterator that’s complaining.

At least we have something to go on now..


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#38 2018-05-16 15:09:11

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

I was thinking it might have to do with the subdirectory though, which might as well lead to a path error.

In this configuration, their root is not muenster.org but muenster.org/medienforum/ …
It’s handled like the old paradigm server.org/~user/

Offline

#39 2018-05-16 15:09:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,437
Website GitHub

Re: Two issues with 4.7.0

Now, this may be an issue if somebody manually extracts a theme – say one they downloaded from our one-day themes site or that was shared by the community – and doesn’t set the same permissions as the surrounding directory. Or maybe if some themes in the /themes directory are symlinked somewhere else in a multi-site installation.

So we definitely need to counter this somehow, but the whole RecursiveIterator thing is above my pay grade right now. Will take some time for me to grok it, so if anyone knows anything about why it does this and can offer a patch/solution before I get a chance to look at it later in the week, please be my guest.

Last edited by Bloke (2018-05-16 15:10:10)


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#40 2018-05-16 15:21:25

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

Re: Two issues with 4.7.0

Sher-Bloke Holmes strikes again!

Can you summarise in an issue so we can track it, Stef?

Offline

#41 2018-05-16 15:22:04

etc
Developer
Registered: 2010-11-11
Posts: 5,673
Website GitHub

Re: Two issues with 4.7.0

Them say

Optional flag. Possible values are RecursiveIteratorIterator::CATCH_GET_CHILD which will then ignore exceptions thrown in calls to RecursiveIteratorIterator::getChildren().

Not tested :-/

Offline

#42 2018-09-21 14:30:44

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

By the way, has anybody figured out what the real problem was here? Had the exact same problem today when trying to upgrade another site on a different server from 4.6.2 to 4.7.1 …

Offline

#43 2018-09-21 14:38:49

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

Again, I find myself stuck in the language panel when attempting to downgrade to 4.6.2, and have this error:

User_Error "Unknown column 'prefs_id' in 'field list'"
in /home/sites/******/web/cms/textpattern/lib/txplib_db.php at line 409.
textpattern/lib/txplib_misc.php:1676 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:409 trigger_error()
textpattern/lib/txplib_db.php:483 safe_query()
textpattern/update/_to_1.0.0.php:203 safe_insert()
textpattern/update/_update.php:90 include()
textpattern/index.php:180 include()

When I look for prefs_id in txp_prefs in my db, I find the following entry. Can I modify this in a way that will help me make it past the language panel?

Last edited by funtoosh (2018-09-21 14:45:44)

Offline

#44 2018-09-21 19:01:36

etc
Developer
Registered: 2010-11-11
Posts: 5,673
Website GitHub

Re: Two issues with 4.7.0

funtoosh wrote #314124:

Again, I find myself stuck in the language panel when attempting to downgrade to 4.6.2, and have this error:

User_Error "Unknown column 'prefs_id' in 'field list'"...

There was an unused prefs_id column in 4.6 that has been removed in 4.7. You can add it manually, but there are other (themes and GDPR related) db changes between 4.6 and 4.7, so 4.6 downgrade is not straightforward. You’d need to do a fresh 4.6 install and then switch 4.7 tables structure to 4.6.

Offline

#45 2018-09-25 10:38:28

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Two issues with 4.7.0

So, I managed to solve this. Here’s what I did: I went into phpmyadmin and deactivated all plugins, then I made the upgrade to 4.7 again, was able to login, was able to update languages. I reactivated all plugins one by one and — even without upgrading them — everything is fine.

As I had this problem before, I guess it’s best to remember the good old WordPress rule and de-activate all plugins before upgrading from 4.6 to 4.7 …

Here’s the list of my plugins:

Offline

Board footer

Powered by FluxBB