Editor & Blog Error - PHP Fatal error: Uncaught TypeError

After changing a published blog entry from public to draft, and changing it’s metadata, both the blog and editor pages stopped loading. With each page producing error messages, the site loads, but the data does not.

I deleted the entry file from the server hoping to resolve. It did not.

Thank you in advanced for considering this puzzle, was hoping to have a post scheduled for this Monday, and I’m not sure how to resolve this.

  • from blog & editor error log:
    [22-May-2022 13:00:43 Pacific/Honolulu] PHP Warning: Undefined variable $currentPage in /home/[REDACTED]/public_html/editor/index.php on line 234
    [22-May-2022 13:00:43 Pacific/Honolulu] PHP Warning: foreach() argument must be of type array|object, null given in /home/[REDACTED]/public_html/editor/index.php on line 310
    [22-May-2022 13:00:43 Pacific/Honolulu] PHP Warning: Undefined variable $zipArray in /home/[REDACTED]/public_html/editor/index.php on line 545
    [22-May-2022 13:00:43 Pacific/Honolulu] PHP Fatal error: Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, null given in /home/[REDACTED]/public_html/editor/index.php:553
    Stack trace:
    #0 /home/[REDACTED]/public_html/editor/index.php(553): array_column()
    #1 {main}
    thrown in /home/[REDACTED]/public_html/editor/index.php on line 553

Hi @jason_ddt on this Sunday evening –

I think I’m missing some information here.

(1) Do you have any live posts on the site? Was this the only post?
(2) What “meta data” did you change? What data is present / missing?

Beyond those questions I’d like to see two things, at a minimum to help it troubleshooting – I will need both in a ZIP file:

(1) A copy of your posts folder from your server.
(2) A copy of your project file. This is the file you open in RapidWeaver to edit your site.

After creating the ZIP file, upload it using a service like Dropbox, WeTransfer, Droplr, or a similar service to create download link for us. Paste that download link in your reply or send the download to me in a direct message.

I am out of the office from this past Friday until Tuesday morning. I the opportunity arises and I have the required items I might be able to look at it tomorrow, but I cannot make a promise. The alternative would be that you could post your files here so others might help solve what has gone wrong with your post(s).

An alternative would also be to download your posts folder to your computer, then delete the contents of the posts folder on the server. Upload one post at a time and test after each to see which might be your problem. If you don’t find one that is a problem, create a temporary post and fill in ALL fields and save it as a draft.

(1) Do you have any live posts on the site? Was this the only post? - I had one post template with filler text. I replaced this text and saved the post from Published to Draft.
(2) What “meta data” did you change? What data is present / missing? I changed the date added tags and changed the slug link.

Files here

Thank you in advance for this.

I am out of the office as I said for the day. Did you try this:

I had a quick chance to pop in to the office before heading out again and had hoped to knock this out for you, but unfortunately you did not provide what I requested. You provided the following files:

CleanShot 2022-05-23 at 08.08.52

While the error logs are helpful, as are the PHP files, those are not what I requested in my reply:

The PHP files are not your project file. The project file is the file that you open in RW when editing your site. And the posts folder is important so I can see if other posts or other contents in the posts folder might be causing you problems.

Anyway, I am unfortunately not likely to be back in the office today, but if you get me the requested items I can have a look tomorrow. I still encourage you to do this though:

When you reply, also please give me the specific PHP version number you’re running on your server.

Hi @elixirgraphics thank you for taking a moment to review. The Project Zip file may have dropped after you’re visit, lmk what else I can provide. and I’ll work through your suggestions today.

I’m on GoDaddy, and CPanel Server info says it’s running 7.4, however I selected 8.1 and enabled yaml which isn’t on by default and before enabling Alloy wouldn’t work on my site.

These settings didn’t change when the site stopped working, I simply updated an existing temp post, saved it and the blog and editor went blank, the page background loads, but nothing else.

LMK what else I can provide. I’ll update if I resolve it through your suggestions.

Quick note, I attempted the “delete post” option after I noticed my saved changes caused the page to stop loading. I cleared the contents of the “Post” folder - just 1 post. and the page still won’t load.

First thing is that Alloy is not designed for PHP 8. You need to be running PHP 7.

As for your project file and posts folder – they are not in the files you sent a link to. I just clicked on the link again and this is what is there (which are the same as when I checked before):

This is the link you provided:

@elixirgraphics weird, I’ll have to check on why OneDrive links aren’t accurate.

I rolled the server back from 8.1 to 7.4 and the page loaded as expected. Any plan to update Alloy for 8.1?

Many thanks for your time troubleshooting this. Appears resolved now.

Glad to hear running the correct PHP version fixed things up for you! Was hoping it was as simple as that and there wasn’t a bigger bug at play. :grin:

As for PHP 8 – Please see this thread: Plans for PHP 8?

I didn’t think to change it back because 8.1 appeared to be working after I enabled yaml.

Thanks again.

BTW for others, GoDaddy’s PHP via CPANEL didn’t have yaml on by default.