Skip Navigation

[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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 12 Antworten, has 2 Stimmen.

Last updated by guyA-2 vor 6 Jahre, 9 Monate.

Assisted by: Noman.

Author
Artikel
#544688

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

How can I resolve these? Thanks.

#544723

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for getting in touch with us. I have just checked it in my test site but cant see any error for this.

1. Can you please make sure that you are using latest Toolset plugins?
https://toolset.com/account/downloads/

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

#544790
Screen Shot 2017-07-04 at 17.25.54.png

Hi,

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?

Thanks,

Guy

#544823

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

#544850

Here is also FTP access to the staging server.

#544851

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Tried to login, looks like WP username / password is not working. Can you please recheck it?

And FTP login info is not visible, please resend that as well. I have enabled private reply box again.

Thank you

#544855

Can you send me another private message so I can add FTP details?

Thanks,

#544860

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Great, WP is working now. I have enabled private message again for FTP. Thanks

#545024

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

Thank you for providing FTP details. I am working on this issue and will get back to you soon with an update.

And yes, I will note down any changes I make to fix the issue and let you know as well.

Thank you for your patience.

#545257

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

Thank you

#545315
Screen Shot 2017-07-05 at 19.48.29.png

Hey Noman,

Thanks for the update.

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.

Let me know if you need anything else from me.

Thanks for your support.

Guy

#545336

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

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

#545537

Hey Noman,

Switching to PHP 7.0.1 fixes the issue for me. Hurrah!

Thanks so much for your help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.