denny / ShinyCMS

ShinyCMS is an open source CMS. This is the Perl version, built with Catalyst and DBIC. (There is also a Ruby on Rails version: www.github.com/denny/ShinyCMS-ruby)
56 stars 24 forks source link

CRITICAL: Page Editor Causes Page To Be Disabled #17

Closed wbraswell closed 9 years ago

wbraswell commented 9 years ago

If I edit a page using the normal method of ShinyCMS page editor, then click "Save", I am sent to the 11-language "(en) Please come back later" page.

When I look in the database "cms_page" table, I see the edited entry's "section" column is now set to NULL instead of a valid integer.

I can manually fix the NULL values and everything starts working again, even the new page content is saved and available. So the page editor save worked, it just NULLified the "section" column when it shouldn't have done so.

In the page editor webUI, there is a drop-down box for "Section", but it is empty (no selectable options), so maybe that's the cause of NULLification of the database column?

This is a critical error and causes ShinyCMS to be unusable by normal users.

wbraswell commented 9 years ago

This may or may not be an associated error message:

Use of uninitialized value in numeric ne (!=) at /home/wbraswell/public_html/shac_seascouts_website-latest/script/../lib/ShinyCMS/Controller/Admin/Pages.pm line 376. [error] Caught exception in ShinyCMS::Controller::Admin::Pages->edit_page "Can't call method "url_name" on an undefined value at /home/wbraswell/public_html/shac_seascouts_website-latest/script/../lib/ShinyCMS/Controller/Admin/Pages.pm line 270."

wbraswell commented 9 years ago

Upon further investigation, it appears that ALL drop-down boxes are blank throughout the various admin areas. I believe these broken drop-down boxes may be the root-cause of this page-editor-breaks-pages issue.

wbraswell commented 9 years ago

I take that back, the "Author" drop-down box in the "Edit Blog Post" page is properly populated with my existing users. But all the other various drop-down boxes seem to be blank.

denny commented 9 years ago

"Upon further investigation, it appears that ALL drop-down boxes are blank throughout the various admin areas. I believe these broken drop-down boxes may be the root-cause of this page-editor-breaks-pages issue."

That seems very likely, but I can't imagine what would be causing it. I've installed two new ShinySites in the last week from the exact same version of the Github code that you're using, and I haven't seen that issue anywhere, let alone everywhere.

Do you really mean throughout the whole admin area, or just in the Pages area? Have you created a CMS Template and CMS Section for your CMS Page to be based on and located in? I'm at a bit of a loss here, sorry.

I see that you're in #shinycms on irc.freenode.net - catch me when you're awake again and we can try to figure it out together.

denny commented 9 years ago

Resolved; problem was conflict between a bit of bad code, and the newest versions of Catalyst. Code updated to address the stash correctly, problem solved.