ERROR: Fatal error : Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, null given in /webroot/p/g/pgccary001/pgc-cary.org/www/daily-devotions/index.php:410 Stack trace: #0 /webroot/p/g/pgccary001/pgc-cary.org/www/daily-devotions/index.php(410): array_column() #1 {main} thrown in /webroot/p/g/pgccary001/pgc-cary.org/www/daily-devotions/index.php on line 410
If all was working well, and now it is not, then something changed somewhere. Perhaps something to do with your hosting, PHP install, your post(s), or something else.
Can you download your site’s index.php file from your daily-devotions folder and share it with me please?
Create a ZIP file containing your that file. 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.
You need a post. This is why Alloy creates a sample post for you. I take it you deleted the sample post? If so you can delete the posts folder and visit the Blog page again to have it recreate the folder and sample post.
If I’m misunderstanding, please provide additional details.
Ok, that worked but when I went to the page that I built to add and manage posts I deleted the sample one and the following error occurred.
Fatal error : Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, null given in /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/daily-devotions-editor/index.php:447 Stack trace: #0 /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/daily-devotions-editor/index.php(447): array_column() #1 {main} thrown in /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/daily-devotions-editor/index.php on line 447
It seems the functionality changed in that the page must have at least one blog post or the error is thrown. This ocurrs on the blog page and the admin page if the last item is deleted.
As I said above you need a post in the posts folder. This is, as I said, why Alloy generates the sample post. Leave the sample post in place. Once you add content of your own then you can delete the sample or make it a draft.
So to be clear you have to have at least one post. What about the admin page it also errors out when you delete the last post or if you only have one post and you put it in draft mode. Basically I want to start a blob with no entries.
So what I am really asking does Alloy require at least one post to function without this error being shown?
Fatal error : Uncaught TypeError: array_column(): Argument #1 ($array) must be of type array, null given in /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/resource-tools-editor/index.php:447 Stack trace: #0 /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/resource-tools-editor/index.php(447): array_column() #1 {main} thrown in /webroot/p/g/pgccary001/pgc-cary.org/www/blog-administration/resource-tools-editor/index.php on line 447
When I created several blog pages for the site and the corresponding admin page to create, edit and delete blog entries I published the site initially with no entries. I have not made any updates to the blog pages in a long time.
However, when I happened to visit one of the blog pages on the site this is when the PHP error was thrown on that page which did not have any entries.
So I am wondering when did this stack behavior change? The office admin is responsible for adding and updating blog entries so initially there were none but the page did not throw a PHP error.
How can I get the stacks to work as it done at some point in the prior versions of Alloy stack.
I hope this clears up what I am asking and on how to move forward to get these pages working again.
Alloy’s functionality has not been updated in over a year, as I’ve been working on a large project. I cannot account for any change on your server or setup, but Alloy itself has not changed its functionality.
You cannot create an Alloy blog with no entries, as the first time you visit the blog or editor it will create an entry for you.
I will be clear – Alloy needs blog posts in the posts folder, as I’ve stated above, to work correctly. This is why Alloy creates one for you. I’m not sure how to be more clear unfortunately.
To be clear here you mean you have multiple blog pages, and multiple editors, too, right? Each separate blog must have a separate editor – they can not all be run from one editor unless the content is the same across them all.