Error Exception With Soliloquy Slider Plugin

Hi!

We’re encountering an odd error in a site that we’re building on Sage 10. This is a redesign of an existing site, and have to use the Soliloquy Plugin for existing content support.

We’re encountering an odd error in the editor that’s breaking Soliloquy’s Gutenberg block, as well as the editor, and am wondering if other folks have come across this issue?

HandleExceptions->handleError(2, 'Trying to access array offset on value of type bool', '/app/web/app/plugins/soliloquy/includes/admin/editor.php', 155)

And this is the specific plugin code here:

<div class="media-frame-content">                                
  <div class="attachments-browser">                                    
    <ul class="soliloquy-meta attachments" style="padding-left: 8px; top: 1em;">                                        
      <?php  foreach ((array) $sliders as $slider) {  
           // $slider is bool here
           if (isset($post->ID) && $post->ID == $slider['id']) {   continue;  }   ?> 
            <li class="attachment" data-soliloquy-id="<?php echo absint($slider['id']); ?>" style="margin: 8px;">
  <div class="attachment-preview">

For some reason the $slider variable is returning a boolean, but I can’t figure out why. When using the default TwentyTwentyThree theme there is no error, so assume that this has something to do with Sage and the way that data is being routed using the View Controller. I tried disabling the setup.php, filters.php, customizer.php, and other top level files included in /app to see if a function or filter or action hook in them was the cause, but no luck; also removed the theme’s editor.js customizations to the block editor.

Looking at the related plugin code, it doesn’t seem like there’s anything that should cause this error, so I’m thinking that it has something to do with the View Controller.

It may be worth turning on WP_DEBUG_LOG and seeing if the error is logged when you have TwentyTwentyThree activated.

1 Like

Thanks @AlexHay that seems to have pointed to a different issue — looks like a conflict with another plugin.