Permalinks error with 3.68

6 posts by 2 authors in: Forums > CMS Builder
Last Post: April 26, 2024   (RSS)

By rez - April 25, 2024 - edited: April 25, 2024

Hi,

I was running into depreciated code yesterday so I have been updating several sites.

I updated a site to CMSB 3.68 with permalinks 1.12, PHP 8.3 and get the following error on my page and in the log:

Unsupported operand types: array | array in /home2/website/public_html/cmsAdmin/plugins/permalinks/permalinks_dispatcher.php on line 31

Thanks.

By rez - April 25, 2024 - edited: April 25, 2024

Oh, jeez. Got it. It says it right there but it was hard to tell where that line was so I figured 31 was in the mentioned permalinks plug. 

 "I" had been working as an operator when it always should have been || . Maybe... error levels on the server changed or some combo of updating, I don't know.

My fault as usual. :D

By Dave - April 25, 2024

Hi rez, 

Glad it's working!  I'm trying to locate the line in our local copy.  Can you post the before and after code? 

Thanks!

Dave Edis - Senior Developer
interactivetools.com

By rez - April 25, 2024 - edited: April 25, 2024

Oh, hi Dave. I was updating my comment same time.

It was my fault. I was using the wrong operator  on my page below. I was using "|" as OR instead of "II". Oddly, it was working until my updates.

Fixed:

<?php if($locationsRecord['pdf_menu'] || $locationsRecord['menu_image']):?>

 The error line 31 and mentioned plugin, threw me off. I guess that's the line when processing or something like that.

Thanks for the fast response.

By Dave - April 26, 2024

Hi Rez, 

Glad to hear you located the issue and it's working again!

For debugging, yea we have a showme() function which outputs the contents of variables.  That can be useful, and checking the Developer Log.  The developer log will often tell you the sequence of functions that was called before the error ("Call Stack") which can be useful.  Typically we'll try to identify the line with the error and then debug and experiment from there.

Feel free ask any more specific questions, always happy to share about coding strategies.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com