July 21, 2018 at 1:19 pm #988151
I have transferred my site to an another host.
And now I have a message error when I want to add a post
Warning: Illegal string offset ‘slideshow’ in /homepages/14/d746932850/htdocs/prod/wp-content/themes/coherence/includes/admin/compat.php on line 48
After a search in the support, it seems that it is an issue when moving from php 5.6 to 7.1 (https://kriesi.at/support/topic/ (Purchase code hidden if logged out) /)
Can you please give me the update for the compact.php ?
Or can you do it ?
with the access in private content
ThanksJuly 21, 2018 at 2:11 pm #988158
the problem comes from the php version.
The test site works perfectly in php 5.6 (with exactly the same files)
ThanksJuly 22, 2018 at 1:52 pm #988374July 22, 2018 at 6:31 pm #988454
Thanks but I don’t understand, the visitors have no messages error.
I don’t see any message error in the frontend ??
Just in the administration when I want to add a post or when I go to the media.
Thanks and sorry about my englishJuly 23, 2018 at 8:43 pm #988885July 23, 2018 at 9:29 pm #988917July 25, 2018 at 10:11 pm #989939
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
BasilisJuly 26, 2018 at 6:40 pm #990341
Hi Basilis and Victoria,
It’s a pity that we can not use the theme coherence with PHP 7.2
Apparently Günter has corrected the file compat.php in the post https://kriesi.at/support/topic/ (Purchase code hidden if logged out) /
So I have switched my 1&1 hosting from PHP 7.2 to PHP 5.6 and everything is working now
Sorry about my english
Thanks anyway for the answerJuly 26, 2018 at 9:36 pm #990453
I found a solution trying compat.php givin by Yigit here : https://kriesi.at/support/topic/ (Purchase code hidden if logged out) /
here is the code of compat.php for coherence witch is compatible with PHP 7.2
//Since the avid framework uses some functions that are very different to the default use of wordpress (for example post thumbnails) the functions here are provided for better compatibility with external plugins
* This function saves the first slideshow image as featured image so plugins that make use of that feature image are able to retrieve it
function avia_backend_compatibility_featured_image($post_id, $result)
$attachmend_id = $result[‘slideshow’][‘slideshow_image’];
if($attachmend_id == “” || ($attachmend_id != “” && ! is_numeric($attachmend_id)))
update_post_meta($post_id, ‘_thumbnail_id’, $attachmend_id);
else if( in_array(get_post_type($post_id), array(‘post’,’page’,’portfolio’)) )
* This function checks if the current custom field is the slideshow custom field and overwrites the first element, in case it is empty and a feature image is set
function avia_backend_compatibility_custom_field_filter($custom_fields, $post_id)
$custom_fields = array(
‘slideshow’ => array(
0 => array( ‘slideshow_image’ => ”)
if(isset($custom_fields[‘slideshow’]) && is_array($custom_fields[‘slideshow’]) && isset($custom_fields[‘slideshow’][‘slideshow_image’]))
$post_thumbnail_id = get_post_meta( $post_id, ‘_thumbnail_id’, true );
if($custom_fields[‘slideshow’][‘slideshow_image’] == “” && $post_thumbnail_id)
$custom_fields[‘slideshow’][‘slideshow_image’] = $post_thumbnail_id;
$post = $wpdb->get_var( $wpdb->prepare( “SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type=’avia_framework_post'”, $post_title ));
if ( $post )
$return = get_post($post, ‘ARRAY_A’);
}July 27, 2018 at 2:12 pm #990714
Glad you got it working for you and thank you for sharing! :)
If you need further assistance please let us know.
VictoriaOctober 18, 2018 at 1:26 pm #1023346
my website is also under PHP 7.2 – and the above code to solve the problem “illigal string offset” in compat.php – is unfortunately not working. I have to use PHP 7.2, and can´t switch to an “lower” version (for “the long run”). So can you give us an solution in form of a download for the working-file compat.php, or a theme update (with compatibility to PHP 7.2)? Please help us..
Thanks in advance!
/michaelaOctober 19, 2018 at 11:11 am #1023838
We also have a site that within 3rd of december will be forced to update to php 7.2. will Enfold be compatible within this time?October 19, 2018 at 4:51 pm #1024024
Yes, will be compatible. Actually now also everything work just fine on the functionality – the error is not something that is braking the theme functionality.
BasilisOctober 19, 2018 at 4:58 pm #1024031
In my case (WP-Theme Coherence) I can´t see any media in the backend. So, this disrupts functionality in the Theme.. I can give you a screenshot of the problem in the PHP 7.2 surrounding. On PHP 5.6 is no problem. Sry, for this conflict (Warning: Illegal string offset ‘slideshow’ in … /wp-content/themes/coherence/includes/admin/compat.php on line 48)
You must be logged in to reply to this topic.