Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect plugin unknown column header error #5953

Closed
thinkerytim opened this issue Feb 2, 2015 · 9 comments
Closed

redirect plugin unknown column header error #5953

thinkerytim opened this issue Feb 2, 2015 · 9 comments

Comments

@thinkerytim
Copy link

Steps to reproduce the issue

Joomla! 3.4.0-beta1 Beta
Enable system redirect plugin

Type in a known bad URL

Expected result

jos-Warning: exception 'RuntimeException' with message 'Unknown column 'header' in 'field list' SQL=SELECT new_url,header,published FROM j_redirect_links WHERE old_url = 'http://localhost/testsite/artiasd' LIMIT 0, 1' in /home/thinkery/www/testsite/libraries/joomla/database/driver/mysqli.php:610 Stack trace: #0 /home/thinkery/www/testsite/libraries/joomla/database/driver.php(1239): JDatabaseDriverMysqli->execute() #1 /home/thinkery/www/testsite/plugins/system/redirect/redirect.php(74): JDatabaseDriver->loadObject() #2 [internal function]: PlgSystemRedirect::handleError(Object(JException)) #3 /home/thinkery/www/testsite/libraries/legacy/error/error.php(760): call_user_func(Array, Object(JException)) #4 [internal function]: JError::handleCallback(Object(JException), Array) #5 /home/thinkery/www/testsite/libraries/legacy/error/error.php(218): call_user_func_array(Array, Array) #6 /home/thinkery/www/testsite/libraries/legacy/error/error.php(179): JError::throwError(Object(JException)) #7 /home/thinkery/www/testsite/libraries/legacy/error/error.php(254): JError::raise(1, 404, 'Article not fou...', NULL, true) #8 /home/thinkery/www/testsite/components/com_content/models/article.php(163): JError::raiseError(404, 'Article not fou...') #9 /home/thinkery/www/testsite/libraries/legacy/view/legacy.php(401): ContentModelArticle->getItem() #10 /home/thinkery/www/testsite/components/com_content/views/article/view.html.php(42): JViewLegacy->get('Item') #11 /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php(690): ContentViewArticle->display() #12 /home/thinkery/www/testsite/components/com_content/controller.php(104): JControllerLegacy->display(false, Array) #13 /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php(728): ContentController->display() #14 /home/thinkery/www/testsite/components/com_content/content.php(16): JControllerLegacy->execute(NULL) #15 /home/thinkery/www/testsite/libraries/cms/component/helper.php(380): require_once('/home/thinkery/...') #16 /home/thinkery/www/testsite/libraries/cms/component/helper.php(360): JComponentHelper::executeComponent('/home/thinkery/...') #17 /home/thinkery/www/testsite/libraries/cms/application/site.php(191): JComponentHelper::renderComponent('com_content') #18 /home/thinkery/www/testsite/libraries/cms/application/site.php(230): JApplicationSite->dispatch() #19 /home/thinkery/www/testsite/libraries/cms/application/cms.php(251): JApplicationSite->doExecute() #20 /home/thinkery/www/testsite/index.php(40): JApplicationCms->execute() #21 {main}

JApplicationCms -> execute() @ /home/thinkery/www/testsite/index.php:40
JApplicationSite -> doExecute() @ /home/thinkery/www/testsite/libraries/cms/application/cms.php:251
JApplicationSite -> dispatch() @ /home/thinkery/www/testsite/libraries/cms/application/site.php:230
JComponentHelper :: renderComponent() @ /home/thinkery/www/testsite/libraries/cms/application/site.php:191
JComponentHelper :: executeComponent() @ /home/thinkery/www/testsite/libraries/cms/component/helper.php:360
require_once() @ /home/thinkery/www/testsite/libraries/cms/component/helper.php:380
JControllerLegacy -> execute() @ /home/thinkery/www/testsite/components/com_content/content.php:16
ContentController -> display() @ /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php:728
JControllerLegacy -> display() @ /home/thinkery/www/testsite/components/com_content/controller.php:104
ContentViewArticle -> display() @ /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php:690
JError :: raiseWarning() @ /home/thinkery/www/testsite/components/com_content/views/article/view.html.php:50
JError :: raise() @ /home/thinkery/www/testsite/libraries/legacy/error/error.php:277

Actual result

System information (as much as possible)

jos-Warning: exception 'RuntimeException' with message 'Unknown column 'header' in 'field list' SQL=SELECT new_url,header,published FROM j_redirect_links WHERE old_url = 'http://localhost/testsite/artiasd' LIMIT 0, 1' in /home/thinkery/www/testsite/libraries/joomla/database/driver/mysqli.php:610 Stack trace: #0 /home/thinkery/www/testsite/libraries/joomla/database/driver.php(1239): JDatabaseDriverMysqli->execute() #1 /home/thinkery/www/testsite/plugins/system/redirect/redirect.php(74): JDatabaseDriver->loadObject() #2 [internal function]: PlgSystemRedirect::handleError(Object(JException)) #3 /home/thinkery/www/testsite/libraries/legacy/error/error.php(760): call_user_func(Array, Object(JException)) #4 [internal function]: JError::handleCallback(Object(JException), Array) #5 /home/thinkery/www/testsite/libraries/legacy/error/error.php(218): call_user_func_array(Array, Array) #6 /home/thinkery/www/testsite/libraries/legacy/error/error.php(179): JError::throwError(Object(JException)) #7 /home/thinkery/www/testsite/libraries/legacy/error/error.php(254): JError::raise(1, 404, 'Article not fou...', NULL, true) #8 /home/thinkery/www/testsite/components/com_content/models/article.php(163): JError::raiseError(404, 'Article not fou...') #9 /home/thinkery/www/testsite/libraries/legacy/view/legacy.php(401): ContentModelArticle->getItem() #10 /home/thinkery/www/testsite/components/com_content/views/article/view.html.php(42): JViewLegacy->get('Item') #11 /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php(690): ContentViewArticle->display() #12 /home/thinkery/www/testsite/components/com_content/controller.php(104): JControllerLegacy->display(false, Array) #13 /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php(728): ContentController->display() #14 /home/thinkery/www/testsite/components/com_content/content.php(16): JControllerLegacy->execute(NULL) #15 /home/thinkery/www/testsite/libraries/cms/component/helper.php(380): require_once('/home/thinkery/...') #16 /home/thinkery/www/testsite/libraries/cms/component/helper.php(360): JComponentHelper::executeComponent('/home/thinkery/...') #17 /home/thinkery/www/testsite/libraries/cms/application/site.php(191): JComponentHelper::renderComponent('com_content') #18 /home/thinkery/www/testsite/libraries/cms/application/site.php(230): JApplicationSite->dispatch() #19 /home/thinkery/www/testsite/libraries/cms/application/cms.php(251): JApplicationSite->doExecute() #20 /home/thinkery/www/testsite/index.php(40): JApplicationCms->execute() #21 {main}

JApplicationCms -> execute() @ /home/thinkery/www/testsite/index.php:40
JApplicationSite -> doExecute() @ /home/thinkery/www/testsite/libraries/cms/application/cms.php:251
JApplicationSite -> dispatch() @ /home/thinkery/www/testsite/libraries/cms/application/site.php:230
JComponentHelper :: renderComponent() @ /home/thinkery/www/testsite/libraries/cms/application/site.php:191
JComponentHelper :: executeComponent() @ /home/thinkery/www/testsite/libraries/cms/component/helper.php:360
require_once() @ /home/thinkery/www/testsite/libraries/cms/component/helper.php:380
JControllerLegacy -> execute() @ /home/thinkery/www/testsite/components/com_content/content.php:16
ContentController -> display() @ /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php:728
JControllerLegacy -> display() @ /home/thinkery/www/testsite/components/com_content/controller.php:104
ContentViewArticle -> display() @ /home/thinkery/www/testsite/libraries/legacy/controller/legacy.php:690
JError :: raiseWarning() @ /home/thinkery/www/testsite/components/com_content/views/article/view.html.php:50
JError :: raise() @ /home/thinkery/www/testsite/libraries/legacy/error/error.php:277

Additional comments

This threw a Fatal PHP error one time, then appeared to handle it via JError in subsequent attempts-- still, it doesn't handle the error gracefully and results in unstyled error page.

@roland-d
Copy link
Contributor

roland-d commented Feb 2, 2015

Hello,
Did you do an update or a clean installation? As far as I can tell for a clean installation the header field is there when creating the table.

@thinkerytim
Copy link
Author

This was an upgrade from the previous 3.4 build

@roland-d
Copy link
Contributor

roland-d commented Feb 2, 2015

In that case such behavior can be expected because the update database queries won't run since you are going from 3.4 to 3.4 :) One thing you can try is to click on the Fix button in the Extension Manager -> Database page. If that fails, a clean installation will need to be done.

@thinkerytim
Copy link
Author

Fix button did not appear to resolve it, but no big deal. I thought since it was going from alpha -> beta that the version check would catch that.

Thanks for the help.

@kraps04
Copy link

kraps04 commented Feb 27, 2015

I have this issue after upgrading from 3.3.6 to 3.4 on a live site - "fix database" does not work and clean install is not an option. Help!

@sovainfo
Copy link
Contributor

Apply these:

ALTER TABLE `#__redirect_links` ADD header smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY new_url varchar(255);

@kraps04
Copy link

kraps04 commented Feb 27, 2015

Works like a charm. Thank you very much!

@Willard1975
Copy link

I had the same issue and sovainfo's solutions worked great. Thanks.

@groenermedia
Copy link

@sovainfo 👍 Your solution works great. Thank you.

@joomla joomla locked and limited conversation to collaborators Jun 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants