Hello,
we’ve recently updated a website to EE 2.9.3, but when linking to an non existent page, it should redirect to a 404 page. Instead, we get this:
Error Number: 1054
Unknown column 'order' in 'order clause'
SELECT `route_parsed`, `template_name`, `group_name` FROM (`exp_templates`) JOIN `exp_template_routes` ON `exp_templates`.`template_id` = `exp_template_routes`.`template_id` JOIN `exp_template_groups` ON `exp_templates`.`group_id` = `exp_template_groups`.`group_id` WHERE `route_parsed` is not null AND `exp_templates`.`site_id` = '1' ORDER BY `order`, `group_name`, `template_name` ASC
Filename: libraries/Template_router.php
Line Number: 83Now, I checked the database and there is indeed no ‘order’ in exp_templates. To know what type this field should be, I did a clean install elsewhere on 2.9.3 and noticed this field isn’t there at all. The request to it though, in Template_router.php, is.
Any ideas?
Thanks!
The order column is on the template_routes table, which is joined to in that query.
If you’re upgrading then maybe this table is empty? That would certainly count as a bug.
Try going to Design > Templates > Template Route Manager and click the “Update” button at the bottom. This should update the contents of the template_routes table to have values for your templates.
If this doesn’t work, you may want to submit a bug to the bug tracker, which you may want to do anyway.
Thanks for your response.
The table itself is not empty, but the order field doesn’t exist in it. I tried to do as you said (update the template route manager), but when I go to the Template Route Manager page, it gets me this error:
Error Number: 1054
Unknown column 'order' in 'order clause'
SELECT `route_parsed`, `template_name`, `group_name` FROM (`exp_templates`) JOIN `exp_template_routes` ON `exp_templates`.`template_id` = `exp_template_routes`.`template_id` JOIN `exp_template_groups` ON `exp_templates`.`group_id` = `exp_template_groups`.`group_id` WHERE `route_parsed` is not null AND `exp_templates`.`site_id` = '1' ORDER BY `order`, `group_name`, `template_name` ASC
Filename: libraries/Template_router.php
Line Number: 83So yeah, pretty much the same error 😊 I could just add a ‘order’ field to this table myself, using Sequel Pro, but I need to know the correct type of this field.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.