Hi
I have upload pics, i can see the thumbnail, but when i click on the pic i have this error.
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 'weight' in 'where clause' - SELECT COUNT(*) AS position FROM items WHERE parent_id = 2 AND `weight` < (SELECT `weight` FROM items WHERE id = 3) ORDER BY `weight` ASC
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,
SELECT COUNT(*) AS position FROM items
WHERE parent_id = 2
AND `weight` < (SELECT `weight`
FROM items WHERE id = 3)
ORDER BY `weight` ASC )
* system/libraries/Database.php [259]:
Database_Mysqli_Driver->query(
SELECT COUNT(*) AS position FROM items
WHERE parent_id = 2
AND `weight` < (SELECT `weight`
FROM items WHERE id = 3)
ORDER BY `weight` ASC )
* modules/gallery/libraries/MY_Database.php [56]:
Database_Core->query(
SELECT COUNT(*) AS position FROM items
WHERE parent_id = 2
AND `weight` < (SELECT `weight`
FROM items WHERE id = 3)
ORDER BY `weight` ASC )
* modules/gallery/models/item.php [393]:
Database->query(
SELECT COUNT(*) AS position FROM {items}
WHERE parent_id = 2
AND `weight` < (SELECT `weight`
FROM {items} WHERE id = 3)
ORDER BY `weight` ASC )
* modules/gallery/controllers/photos.php [28]:
Item_Model->get_position( 3 )
* modules/gallery/controllers/rest.php [91]:
Photos_Controller->_show( Item_Model Object
(
[children:protected] => items
[view_restrictions:private] =>
[sorting:protected] => Array
(
)
[rules] => Array
(
[name] => required|length[0,255]
[title] => required|length[0,255]
[description] => length[0,65535]
)
[model_name:private] => item
[has_one:protected] => Array
(
)
[belongs_to:protected] => Array
(
)
[has_many:protected] => Array
(
)
[has_and_belongs_to_many:protected] => Array
(
)
[load_with:protected] => Array
(
)
[object:protected] => Array
(
[id] => 3
[album_cover_item_id] =>
[captured] =>
[created] => 1247848783
[description] =>
[height] => 2304
[left] => 3
[level] => 3
[mime_type] => image/jpeg
[name] => DSCN4504.JPG
[owner_id] => 2
[parent_id] => 2
[rand_key] => 0.507039
[relative_path_cache] => DSCN4504.JPG
[resize_dirty] => 0
[resize_height] => 480
[resize_width] => 640
[right] => 4
[sort_column] => weight
[sort_order] => ASC
[thumb_dirty] => 0
[thumb_height] => 150
[thumb_width] => 200
[title] => DSCN4504
[type] => photo
[updated] => 1247848786
[view_count] => 0
[weight] => 3
[width] => 3072
[view_1] => 1
[view_2] => 1
)
[changed:protected] => Array
(
)
[related:protected] => Array
(
)
[loaded:protected] => 1
[saved:protected] => 1
[object_relations:protected] => Array
(
)
[changed_relations:protected] => Array
(
)
[object_name:protected] => item
[object_plural:protected] => items
[table_name:protected] => items
[table_columns:protected] => Array
(
[id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[sequenced] => 1
)
[album_cover_item_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[captured] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[created] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[description] => Array
(
[type] => string
[length] => 2048
[null] => 1
)
[height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[left] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)
[level] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)
[mime_type] => Array
(
[type] => string
[length] => 64
[null] => 1
)
[name] => Array
(
[type] => string
[length] => 255
[null] => 1
)
[owner_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[parent_id] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)
[rand_key] => Array
(
[type] => float
[null] => 1
)
[relative_path_cache] => Array
(
[type] => string
[length] => 255
[null] => 1
)
[resize_dirty] => Array
(
[type] => int
[max] => 127
[unsigned] =>
[null] => 1
)
[resize_height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[resize_width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[right] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)
[sort_column] => Array
(
[type] => string
[length] => 64
[null] => 1
)
[sort_order] => Array
(
[type] => string
[exact] => 1
[length] => 4
[null] => 1
)
[thumb_dirty] => Array
(
[type] => int
[max] => 127
[unsigned] =>
[null] => 1
)
[thumb_height] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[thumb_width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[title] => Array
(
[type] => string
[length] => 255
[null] => 1
)
[type] => Array
(
[type] => string
[length] => 32
)
[updated] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[view_count] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[weight] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
)
[width] => Array
(
[type] => int
[max] => 2147483647
[unsigned] =>
[null] => 1
)
[view_1] => Array
(
[type] => int
[max] => 32767
[unsigned] =>
)
[view_2] => Array
(
[type] => int
[max] => 32767
[unsigned] =>
)
)
[ignored_columns:protected] =>
[primary_key:protected] => id
[primary_val:protected] => name
[foreign_key:protected] => Array
(
)
[table_names_plural:protected] => 1
[reload_on_wakeup:protected] => 1
[db:protected] => Database Object
(
[_table_names:protected] => Array
(
[{access_caches}] => g3access_caches
[{access_intents}] => g3access_intents
[{comments}] => g3comments
[{caches}] => g3caches
[{graphics_rules}] => graphics_rules
[{groups}] => groups
[{groups_users}] => groups_users
[{incoming_translations}] => incoming_translations
[{items}] => items
[{items_tags}] => items_tags
[{logs}] => logs
[{messages}] => messages
[{modules}] => modules
[{outgoing_translations}] => g3outgoing_translations
[{permissions}] => permissions
[{search_records}] => search_records
[{sessions}] => sessions
[{tags}] => tags
[{tasks}] => tasks
[{themes}] => themes
[{users}] => users
[{vars}] => vars
)
[config:protected] => Array
(
[benchmark] =>
[persistent] =>
[connection] => Array
(
[type] => mysqli
[user] => tonsplan_galler3
[pass] =>
[host] => localhost
[port] =>
[socket] =>
[database] => tonsplan_gallery3
)
[character_set] => utf8
[table_prefix] => g3
[object] => 1
[cache] =>
[escape] => 1
)
[driver:protected] => Database_Mysqli_Driver Object
(
[link:protected] => mysqli Object
(
)
[db_config:protected] => Array
(
[benchmark] =>
[persistent] =>
[connection] => Array
(
[type] => mysqli
[user] => tonsplan_galler3
[pass] =>
[host] => localhost
[port] =>
[socket] =>
[database] => tonsplan_gallery3
)
[character_set] => utf8
[table_prefix] => g3
[object] => 1
[cache] =>
[escape] => 1
)
[statements:protected] => Array
(
)
[query_cache:protected] =>
)
[link:protected] => mysqli Object
(
)
[select:protected] => Array
(
)
[set:protected] => Array
(
)
[from:protected] => Array
(
)
[join:protected] => Array
(
)
[where:protected] => Array
(
)
[orderby:protected] => Array
(
)
[order:protected] => Array
(
)
[groupby:protected] => Array
(
)
[having:protected] => Array
(
)
[distinct:protected] =>
[limit:protected] =>
[offset:protected] =>
[last_query:protected] => SELECT `key`, `translation`
FROM (`g3outgoing_translations`)
WHERE `locale` = 'en_US'
[query_history:protected] => Array
(
)
)
[db_applied:protected] => Array
(
)
[with_applied:protected] => Array
(
)
)
)
*
REST_Controller->__call( 3 )
* system/core/Kohana.php [291]:
ReflectionMethod->invokeArgs( Photos_Controller Object
(
[resource_type:protected] => item
[uri] => URI Object
(
)
[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)
)
, Array
(
[0] => 3
[1] => Array
(
)
)
)
*
Kohana::instance( )
* system/core/Event.php [209]:
call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)
* system/core/Bootstrap.php [55]:
Event::run( system.execute )
* index.php [85]:
require( system/core/Bootstrap.php )
Posts: 7994
I'm guessing you tried to upgrade from alpha 4. You can't do that.. you have to reinstall. You can only upgrade from beta 1. If you had alpha 4 before, you must do a fresh install.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!