0

SP Page builder pro 3.8 version
Facing error in frontend editor of homepage only.

The code where the error occurs is:

$css .= 'height:'.$gallery_height.'px;';
$css = '';
if($gallery_height){
    $css .= $addon_id .' .sppb-gallery-parallax:after {';
    $css .= 'height:'.$gallery_height.'px;';
    $css .= '}';

    $css .= '@media (min-width: 768px) and (max-width: 991px) {';

    $css .= $addon_id .' .sppb-gallery-parallax:after {';
    $css .= 'height:'.$gallery_height_sm.'px;';
    $css .= '}';

    $css .= '}';

    $css .= '@media (max-width: 767px) {';

    $css .= $addon_id .' .sppb-gallery-parallax:after {';
    $css .= 'height:'.$gallery_height_xs.'px;';
    $css .= '}';

    $css .= '}';
}
return $css;
2
  • Thank for joining us Shakeel. Please take our tour while you wait for feedback/support. Can you please var_export() all of the variables in your script? I don't know which of those variables is the object.
    – mickmackusa
    Feb 15 at 6:28
  • The error occurs in a 3rd party template. Have you updated your template to the latest version? And what's line 67 in your script?
    – pe7er
    Feb 15 at 8:09

1 Answer 1

2

The first line is trying to concatenate a string onto the end of $css, but $css would have to already be a string (or be a variable type that can be cast to a string, like an integer) for that to work. If it's an object then that would cause your error. We'd need to see how and where $css gets generated in the first place.

The second line is sticking out for me.

$css = '';

It completely overrides the line before it and makes it pointless, as well as any earlier references to $css that aren't included in the code above. I would point this out to the template developers in case it has been left in by error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.