Permalinks error with 3.68

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

By rez - April 25 - edited: April 25

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 - edited: April 25

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 rez - April 25 - edited: April 25

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 rez - April 25 - edited: April 25

Actually, I have a question.

Can you list any CMSB debugging functions or straight forward techniques for CMSB you often use?

For instance, I remember you had a showme function and I will search that again; its been a while. Are there any new or additional CMSB specific debugging suggestions, like the showme function, when running into errors or problems?  

By Dave - April 26

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