Error when adding Forums

Post

Posted
Rating:
#298 (In Topic #69)
Avatar
Standard member
Finncat is in the usergroup ‘Fan in action’
When running the first time setupwizard I installed only very minimal options.
And I left the forums out.
Then I added forums from Adminzone-Structure-Addons-Module management, no problems.
Forum tools appear now in Structure (Forums->) and Setup menus (Forum options) and there are pregenerated forum groups.
I can add a new forum group.

But when trying to add a new forum, it fails with the following  error:

PHP WARNING [2] array_key_exists() [<a href='http://php.net/manual/en/function.array-key-exists.php'>function.array-key-exists.php</a>]: The second argument should be either an array or an object in sources/fields.php on line 346 (version: 10 beta5, PHP version: 5.2.17, URL: /ocportal/adminzone/index.php?page=admin-cns-forums&type=add)

And after that there comes a lot of stack trace announsments.

Should I try to run the setupwizard again or what? There are no actual contents yet, I'm just sketching the site up.
Online now: No Back to the top

Post

Posted
Rating:
#299
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi Finncat,

I will 'fix' this error for the next release, but it's happening due to a fundamental inconsistency with the files you have on your site.

It looks like you have adminzone/pages/modules/admin_cns_forums.php on disk, but you do not have sources/hooks/systems/content_meta_aware/forum.php on disk. That shouldn't be possible – either the cns_forums addon is installed, or it's not, it shouldn't ever have a partial set of it's files.

Is this something that's gone wrong somewhere else, or at some point did you perhaps restore some files back, or upload some changed files from the source or something like that?

Regardless, the integrity checker in /upgrader.php should advise you about any inconsistencies in the file state.

What you did in Adminzone-Structure-Addons-Module management wouldn't have been related to the error because that doesn't restore addon files, just installs modules to the database, and it's a files issue. The navigation links would have been there regardless of whether the admin_cns_forums module was installed into the database or not. As a side note, the module management is strictly intended for programmers, mainly developers working on their own modules who need to test reinstalling their database code - it's possible to trigger all kinds of random site errors if things are changed in there, so I definitely only recommend it to programmers.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#300
Avatar
Standard member
Finncat is in the usergroup ‘Fan in action’
Thank you a lot Chris for the explanation.

Maybe something went wrong during the upgrading process from ocPortal to Composr after all.
Or maybe I messed something  earlier during the original ocPortal installation? I didn't try the forums in ocPortal, so it remains a mystery for that part.

The reason a used module management was because the navigation links to forums were missing and reading the module management list showed that the forums were not installed - so it seemed natural to tick the install options and run the installer - which brought up the navigation links as expected. I could not find any other place to activate it.

I think I'll clean the folders and drop the database from the server and start with a fresh new  installation, now that the password issue is cleared it shouldn't be a problem.


Online now: No Back to the top

Post

Posted
Rating:
#304
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Are you sure you used module management, and not the main addon management screen before it? I think that's more likely, that you installed cns_forum from there (the addon, not a module).

I just looked again, and actually the sources/hooks/systems/content_meta_aware/forum.php is will be there, but it's returning null.

So I'm going to give a different answer now. I think it's more likely the forum zone disappeared with the forum addon, then didn't come back with installation. I need to run some tests, but if this is the case, add a forum zone back, with default page as forumview would fix it.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#305
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Yeah, confirmed – you reinstalled the addon, and the forum zone isn't being recreated with the addon (i.e. the database record for it). Will fix for next release.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,830 members
  • Our newest member is Customcollective
Back to Top