.12: Refreshing page after module installation adds dupe to table, breaks admin

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
ChrisC

.12: Refreshing page after module installation adds dupe to table, breaks admin

Post by ChrisC »

After installing a module, I hit my browser's refresh button so that the admin menus update.  In Beta 2, this adds a duplicate row in the cms_modules table.  On future attempts to access admin pages, wackiness results.  Either the admin interface loses its CSS, or a fatal error occurs saying that the module class has been declared twice.

WARNING: Don't try the following unless you have phpMyAdmin or similar access to fix your cms database afterwards.

Repro (works for me with Firefox):

1.) Uninstall the skeleton module if you have it installed.
2.) Go to extensions->modules and install skeleton.
3.) After reading install msgs, hit your browser's 'refresh' button.
4.) Try any admin function.  You should see either a fatal error or the admin interface w/ styling.
5.) Look in the cms_modules table of your cms database.  Notice duplicate entries for skeleton.
6.) Delete second entry, and you're back to normal.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: .12: Refreshing page after module installation adds dupe to table, breaks admin

Post by Ted »

Are you hitting refresh during the message or after you get back to the list?

Without a post message, it doesn't give me the same error.  Though, I can see that happening if done during a post message.

Thanks!
ChrisC

Re: .12: Refreshing page after module installation adds dupe to table, breaks ad

Post by ChrisC »

Yep, I'm refreshing on the page with "Post Install Message, e.g., Be sure to set "Use Skeletons" permissions to use this module!" displayed.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: .12: Refreshing page after module installation adds dupe to table, breaks admin

Post by Ted »

Ok, that makes perfect sense.  I'll see what I can do to have a redirect in there.  Thanks.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: .12: Refreshing page after module installation adds dupe to table, breaks admin

Post by Ted »

If it redirects to the post install message instead of going right to it in the same request as the actual install, it should be fine.  That's why it won't do it without a post install message, because it installs the module and redirects before displaying the list again.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: .12: Refreshing page after module installation adds dupe to table, breaks admin

Post by Ted »

fixed in svn.  Thanks!
Locked

Return to “[locked] Quality Assurance”