Page 1 of 1

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

Posted: Sat Feb 18, 2006 11:31 pm
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.

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

Posted: Sun Feb 19, 2006 3:22 am
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!

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

Posted: Sun Feb 19, 2006 5:03 pm
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.

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

Posted: Sun Feb 19, 2006 5:30 pm
by Ted
Ok, that makes perfect sense.  I'll see what I can do to have a redirect in there.  Thanks.

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

Posted: Sun Feb 19, 2006 10:04 pm
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.

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

Posted: Mon Feb 20, 2006 3:25 am
by Ted
fixed in svn.  Thanks!