[Gelöst] Warning: Illegal string offset ‚post_status‘ in /var/sites/t/tauron.wildheartmed
Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.
Problem:
Errors in the “Settings for Post Expiration Date” in custom post type:
Warning: Illegal string offset 'post_status' in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
Warning: Cannot assign an empty string to a string offset in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
Solution:
Changing PHP version to v7.0.1 or closer version available, fixes the issue.
This support ticket is created vor 6 Jahre, 9 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
In the Settings for Post Expiration Date in my custom post type I'm seeing these error messages:
Warning: Illegal string offset 'post_status' in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
Warning: Cannot assign an empty string to a string offset in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
2. Can you please try to delete CRED plugin (ensure via FTP that cred-frontend-editor folder is removed completely) >> then reinstall it >> And check if the issue gets resolved?
Please let me know the results afterwards. Thank you
I've now updated to the latest versions of all Toolset plugins now.
The problem is still there. See my attached screengrab.
The error is:
Warning: Illegal string offset 'post_status' in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
Warning: Cannot assign an empty string to a string offset in /var/sites/t/tauron.wildheartmedia.net/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CredPostExpiration.php on line 925
This can be found in the trainings custom post type and we're using the cred form to set an expiration date.
Can you enable a personal message so I can send you WP login details?
Ok, please send me temporary access (WP-Admin and FTP Login info) to your site. Your next answer will be private which means only you and I have access to it.
=== Please backup your database and website ===
✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.
Hi, just like to send a status update. I have been debugging this issue, have done various kinds of testing but issue is still there. Now I am going to duplicate site and test it locally and see what happens. Its a very strange issue, I have a feeling that it has something to do with server side or php version on the server or something like that.
Once I finish testing on localhost I will update you here accordingly today.
We have another site in development using the same version of PHP 7.1.5 and the cred auto expiry form is working fine in our custom post type on that site.
If you enable a private message I will send you the php info(); for both these staging servers so you can compare.
The only difference in Toolset plugins is that we're running cred 1.9 on the other staging site instead of the latest version of cred which is 1.9.0.1. But I don't think this is the issue as I've just rolled back to 1.9 on Tauron.
I've attached a screengrab of the Toolset plugins showing versions on the other staging server.
Ok, on the staging site the error shows in all post types even on WP standard Posts once I set expiration for it. Below are details of my testing:
1. I have tested your duplicated site on localhost on this server environment and it worked fine:
- PHPVersion v7.0.9, MySQLVersion v5.5.5
Steps I followed are:
- Deactivated plugins except CRED & Types.
- Changed theme to Twenty Sixteen.
- Created duplicator package.
- Tested on localhost (xampp) with exact same settings as online staging site.
- Added new posts or edited existing ones with post expiry and I see no error on the local site.
If it's not php version then there must be some custom WP configurations being made in your site or server which is causing the function to break (file permissions or any other thing), so please try to check on that. The error comes due to post_status, it's also possible that some database table got corrupted somehow in this site only.
2. If above does not help, next steps I would suggest you to take:
- Duplicate site on localhost (or may be another hosting server) using Duplicator, package download here: hidden link
- Let us know what you see on the local version of site?
3. Another thing you can try is to make a fresh Test wp site >> install only CRED & Types (no other theme or plugin) >> create new post expiry form >> and see what happens on it.
So far I am not able to reproduce this on my Test site and on Local copy of your exact same site. And both these tests I run on completely different environments. Thank you