Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Chad Cloman

    (@chadcloman)

    I changed the metadata database entries for “ris_all_photos_details” to use the WordPress serialized information instead of the double-serialized information that had been there. This now prevents the slider from crashing the page.

    However, the sliders image placeholders are gray and don’t show the images themselves. Is there something else I need to modify?

    I suggest putting in some error-handling code to see if the result of each get_post_meta() call in layout.php is a string or an array. That way you could exit gracefully instead of crashing the page with a message that WordPress is broken. Here’s something like what I’m thinking:

    
    $URIS_All_Slide_Ids = get_post_meta( get_the_ID(), 'ris_all_photos_details', true);
    if (!is_array($URIS_All_Slide_Ids))
      $URIS_All_Slide_Ids = [];
    $TotalSlideIds = count($URIS_All_Slide_Ids);
    
    

    I’m making the assumption that the rest of the script would work with no metadata and a count of zero, but this is just an example off the top of my head. You get the idea. It’s the count() call that crashes the script, because it’s expecting an array and is getting a string.

    • This reply was modified 3 years, 9 months ago by Chad Cloman.
    Thread Starter Chad Cloman

    (@chadcloman)

    Okay, I found the “Recover Old Sliders” menu option. It didn’t work and erased all the slides, but I found it. So I guess that answers all my questions. Marking as resolved.

    • This reply was modified 3 years, 9 months ago by Chad Cloman. Reason: wording change
    Plugin Author FARAZFRANK

    (@farazfrank)

    Hi Chad,

    Sorry! I am on vacation for a few days.

    I am happy you finally found the solution for that. That’s really great.

    Thanks for using the slider, if you like please rate and share your valued feedback about the slider: HERE

    Thanks and have a great day ahead 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Double Serialization’ is closed to new replies.