Dang... Something went wrong!
We tried really hard, but it's broken.
Hey wait, you're an admin! We can tell you stuff.
Ok.. tell me stuff!
Help!
If this stuff doesn't make any sense to you, ask for help in the Gallery forums!
So here's the error:
There was an SQL error: Unknown column 'left' in 'g3beta_items' - ALTER TABLE g3beta_items CHANGE COLUMN `left` `left_ptr` INT(9) NOT NULL;
File: system/libraries/drivers/Database/Mysqli.php, line: 142
And here's how we got there:
* system/libraries/drivers/Database/Mysqli.php [90]:
Kohana_Mysqli_Result->__construct( mysqli Object
(
)
, 1, ALTER TABLE g3beta_items CHANGE COLUMN `left` `left_ptr` INT(9) NOT NULL; )
* system/libraries/Database.php [259]:
Database_Mysqli_Driver->query( ALTER TABLE g3beta_items CHANGE COLUMN `left` `left_ptr` INT(9) NOT NULL; )
* modules/gallery/libraries/MY_Database.php [56]:
Database_Core->query( ALTER TABLE g3beta_items CHANGE COLUMN `left` `left_ptr` INT(9) NOT NULL; )
* modules/gallery/helpers/gallery_installer.php [332]:
Database->query( ALTER TABLE {items} CHANGE COLUMN `left` `left_ptr` INT(9) NOT NULL; )
* modules/gallery/helpers/module.php [149]:
gallery_installer::upgrade( 8 )
* modules/gallery/controllers/upgrader.php [60]:
module_Core::upgrade( Array
(
[0] => gallery_installer
[1] => upgrade
)
, Array
(
[0] => 8
)
)
*
Upgrader_Controller->upgrade( gallery )
* system/core/Kohana.php [291]:
ReflectionMethod->invokeArgs( )
* system/core/Event.php [209]:
Kohana::instance( Upgrader_Controller Object
(
[uri] => URI Object
(
)
[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] =>
[ip_address] =>
)
)
)
* system/core/Bootstrap.php [55]:
Event::run( )
* index.php [86]:
require( system/core/Bootstrap.php )
Posts: 22888
See if using an experimental version helps.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 39
Hello,
I downloaded the newest experimental version: gallery-gallery3-83203a1 and ran the upgrader. It said that version 15 was available so I hit upgrade all and I got the following error, which may be the same message.
Anything else I could try? Any help would be appreciated.
Peter
Posts: 22888
Can you show us the output from these two SQL queries?
"SHOW CREATE TABLE items"
"SELECT * FROM modules WHERE name='gallery'"
Looks to me like the upgrader did not work properly with the columns `left` `left_ptr`
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 39
Hello,
When I run SHOW CREATE TABLE items i get the message: #1146 - Table 'petermucha_gallery3.items' doesn't exist
But when I run SHOW CREATE TABLE g3beta_items
Similarly the second query produces this result: #1146 - Table 'petermucha_gallery3.modules' doesn't exist
While SELECT * FROM g3beta_modules WHERE name='gallery' produces:
So it seems like the upgrader didn't take into account the fact that I have prefixes in my tables, but the gallery itself installed and ran well with the prefixes. How do I get the upgrader to recognize the proper names?
Thanks, Peter
Posts: 7934
That's odd. Your g3beta_items table is at version 10, but your modules table is at version 8. I can't conceive of a scenario where that would happen, barring somebody tinkering with the database. I am willing to believe that hitting refresh in the middle of the upgrader could cause this kind of issue. I've created http://sourceforge.net/apps/trac/gallery/ticket/837 to address this.
I don't know how extensive the damage is, though. Let's try the simple approach of just getting it to continue. Try running this SQL:
UPDATE g3beta_modules SET version=10 WHERE name='gallery';Then run the upgrader again. Out of curiousity, how many items and groups do you have in your gallery (ballpark estimates are fine)?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 39
Thanks for the help, I'm sure that pressing refresh didn't help. As all the photos were imported from my galler 2 install which is still live I have around 6500 items, and Rows in GalleryAlbumItem table = 111 (if that's what you meant by groups)
I ran the SQL as request and got back this result:
I ran the upgrader, and this time it showed installed version 10, available 15. I hit upgrade all and this time it took about 5 seconds then showed:
What should I do next?
Thanks, Peter
(*Edited to shorten long strings to stop scrolling)
Posts: 7934
There was an SQL error: Unknown column 'left_ptr' in 'where clause'Ok that's confusing because in your prior post, the table structure clearly showed that you have a left_ptr column in the items table. Can you check to see if that column exists?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 39
It shows that the column was not found when it tried to execute this statement: UPDATE `g3beta_sessions` SET `last_activity` = 1255282242, ... I checked the g3beta_sessions and there is no left_ptr column, the statment that I posted above was from g3beta_items and not sessions. Not sure what this means or why the upgrader is looking in the sessions table not the items table.
Posts: 7934
I suspect that we have multiple errors here. One error is leaving the Database class in a weird state such that when we come along and try to save the session it's getting messed up. Ah, I see what happened. The left column got renamed to left_ptr, but the right column did not get renamed to right_ptr. Let's try doing that by hand with this SQL:
See if that fixes it.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 39
Thanks, that seems to have fixed it. After running the SQL I browsed to the upgrader and it said that my gallery was up to date right away (version 15). And I am able to rotate photos and add items as well. Thanks again for the help!
Peter