Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #988151

    Hi,
    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

    Thanks

    #988158

    Hi,
    the problem comes from the php version.
    The test site works perfectly in php 5.6 (with exactly the same files)
    Thanks

    #988374

    Hi ppi37,

    You might want to hide debug messages from your visitors.
    Here is how to configure it
    https://premium.wpmudev.org/blog/ (Purchase code hidden if logged out) -wp_debug/

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #988454

    Hi Victoria,
    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 english

    #988885

    Hi,

    Have you followed what Victoria has send u?

    Best regards,
    Basilis

    #988917
    This reply has been marked as private.
    #989939

    Hi,

    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 :)

    Best regards,
    Basilis

    #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 answer

    #990453

    Hi,
    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
    Thanks Yigit
    ________________________________________
    <?php
    //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

    if(!function_exists(‘avia_backend_compatibility_featured_image’))
    {
    /*
    * 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)
    {
    if(isset($result[‘slideshow’][0][‘slideshow_image’]))
    {
    $attachmend_id = $result[‘slideshow’][0][‘slideshow_image’];

    if($attachmend_id == “” || ($attachmend_id != “” && ! is_numeric($attachmend_id)))
    {
    delete_post_meta($post_id, ‘_thumbnail_id’);
    }

    if(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’)) )
    {
    delete_post_meta($post_id, ‘_thumbnail_id’);
    }
    }

    add_action(‘avia_meta_box_save_post’,’avia_backend_compatibility_featured_image’,10,2);
    }

    if(!function_exists(‘avia_backend_compatibility_custom_field_filter’))
    {
    /*
    * 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)
    {
    if(empty($custom_fields))
    {
    $custom_fields = array(
    ‘slideshow’ => array(
    0 => array( ‘slideshow_image’ => ”)
    )
    );
    }

    if(isset($custom_fields[‘slideshow’]) && is_array($custom_fields[‘slideshow’]) && isset($custom_fields[‘slideshow’][0][‘slideshow_image’]))
    {
    $post_thumbnail_id = get_post_meta( $post_id, ‘_thumbnail_id’, true );

    if($custom_fields[‘slideshow’][0][‘slideshow_image’] == “” && $post_thumbnail_id)
    {
    $custom_fields[‘slideshow’][0][‘slideshow_image’] = $post_thumbnail_id;
    }
    }
    return $custom_fields;
    }

    add_filter(‘avia_meta_box_filter_custom_fields’,’avia_backend_compatibility_custom_field_filter’,10,2);
    add_filter(‘avia_post_meta_filter’,’avia_backend_compatibility_custom_field_filter’,10,2);
    }

    if(!function_exists(‘avia_get_post_by_title’))
    {
    function avia_get_post_by_title($post_title)
    {

    global $wpdb;
    $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’);
    return $return;
    }

    return null;
    }
    }

    #990714

    Hi ppi37,

    Glad you got it working for you and thank you for sharing! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1023346

    Hi Kriesi-Team,
    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!
    /michaela

    #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?

    #1024024

    Hi,

    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.

    Best regards,
    Basilis

    #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)

    #1026125

    Hi,

    We do need some time, we will see with out devs how to upgrade the theme.

    Best regards,
    Basilis

    #1033013

    Hi Guys, Dear Kriesi-Support,
    when do we can have the Update for the PHP-Problem. In December we havn´t any support for the PHP Version 5.6. So – when do the update (or better the solution) will come? Thanks in advance.
    /Michaela

    #1034205

    Hi,

    Our team is working hard on having all the themes updated as soon as possible.
    We appreciate hte understanding and the patience.

    Best regards,
    Basilis

Viewing 17 posts - 1 through 17 (of 17 total)

You must be logged in to reply to this topic.