"Blog" went missing
Permalink
Concrete5 5.2.3.1
Shared LAMP with Plesk
PHP 5.2-something (ugh)
Issue: All "blog" pages MIA, details below
Question: Ideas that might cause this and where to look? Reinstall is not an option.
My skill: 17 year developer, don't know diddly about C5
Background: Was running fine of course, a year or two ago we made some small mods to themes and output, didn't mess with any core files (but dug thorough some of them to grok how they work.) As above, I don't know anything about C5 but know enough programing to get anything done without breaking stuff.
There is an area on the main page that listed blog posts. This weekend it appears /blog went missing, so now this error throws an exception with "unexpected database error", and of course none of the rest of the page renders. It's not a database connection - the rest of the site renders fine The resource "blog" no longer appears in the admin sitemap, recreating it doesn't work.
It occurs here in home.php:
$a = new Area('Home Column 1');
//$a->display($c);
... commented out so the page renders. Columns 2 and 3 use the same methods and render fine. I'm chasing those methods down as you read this, most likely, to get to the cause.
Database is fine. I have a working backup database and it shows only a few more entries for /blog/ than the current one, I have faith the posts are all still there (though the Blogs table is empty in both. Odd.)
Given that I can't risk an upgrade until it's fixed, probably shouldn't re-import our old database backup (5 months ago,) does anyone have any ideas where I can look to sort out where this got broken?
BTW I've reviewed some key files for common hacks, not seeing any.
Shared LAMP with Plesk
PHP 5.2-something (ugh)
Issue: All "blog" pages MIA, details below
Question: Ideas that might cause this and where to look? Reinstall is not an option.
My skill: 17 year developer, don't know diddly about C5
Background: Was running fine of course, a year or two ago we made some small mods to themes and output, didn't mess with any core files (but dug thorough some of them to grok how they work.) As above, I don't know anything about C5 but know enough programing to get anything done without breaking stuff.
There is an area on the main page that listed blog posts. This weekend it appears /blog went missing, so now this error throws an exception with "unexpected database error", and of course none of the rest of the page renders. It's not a database connection - the rest of the site renders fine The resource "blog" no longer appears in the admin sitemap, recreating it doesn't work.
It occurs here in home.php:
$a = new Area('Home Column 1');
//$a->display($c);
... commented out so the page renders. Columns 2 and 3 use the same methods and render fine. I'm chasing those methods down as you read this, most likely, to get to the cause.
Database is fine. I have a working backup database and it shows only a few more entries for /blog/ than the current one, I have faith the posts are all still there (though the Blogs table is empty in both. Odd.)
Given that I can't risk an upgrade until it's fixed, probably shouldn't re-import our old database backup (5 months ago,) does anyone have any ideas where I can look to sort out where this got broken?
BTW I've reviewed some key files for common hacks, not seeing any.
Which kicks in the logs:
s Exception Occurred: mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and cIsTemplate = 0 and (Packages.pkgHandle <> 'core' or pkgHandle is null or Pa' at line 1] in EXECUTE("select cID from Pages left join Packages on Pages.pkgID = Packages.pkgID where cParentID = and cIsTemplate = 0 and (Packages.pkgHandle <> 'core' or pkgHandle is null or Pages.ctID > 0)")
#0 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1064, 'You have an err...', 'select cID from...', false, Object(ADODB_mysql))
#1 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(1017): ADOConnection->_Execute('select cID from...', false)
#2 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(766): ADOConnection->Execute('select cID from...', false)
#3 [internal function]: ADOConnection->Query('select cID from...')
#4 /var/www/vhosts/example.com/httpdocs/concrete/libraries/database.php(73): call_user_func_array(Array, Array)
#5 [internal function]: Database->__call('query', Array)
#6 /var/www/vhosts/example.com/httpdocs/concrete/models/page.php(803): Database->query('select cID from...')
#7 /var/www/vhosts/example.com/httpdocs/concrete/models/page.php(796): Page->_getNumChildren(NULL, 0)
#8 /var/www/vhosts/example.com/httpdocs/packages/blog/models/blog_post.php(80): Page->getCollectionChildrenArray()
#9 /var/www/vhosts/example.com/httpdocs/packages/blog/blocks/blog_list/controller.php(77): BlogPost::getAllByParentCollectionID('104')
#10 [internal function]: BlogListBlockController->view()
#11 /var/www/vhosts/example.com/httpdocs/concrete/libraries/controller.php(134): call_user_func_array(Array, Array)
#12 /var/www/vhosts/example.com/httpdocs/concrete/libraries/block_controller.php(222): Controller->runTask('view', Array)
#13 /var/www/vhosts/example.com/httpdocs/concrete/libraries/block_view.php(202): BlockController->setupAndRun('view')
#14 /var/www/vhosts/example.com/httpdocs/concrete/models/area.php(363): BlockView->render(Object(Block))
#15 /var/www/vhosts/example.com/httpdocs/themes/gen-next/home.php(51): Area->display(Object(Page))
#16 /var/www/vhosts/example.com/httpdocs/concrete/libraries/view.php(740): include('/var/www/vhosts...')
#17 /var/www/vhosts/example.com/httpdocs/concrete/dispatcher.php(214): View->render(Object(Page))
#18 /var/www/vhosts/example.com/httpdocs/index.php(2): require('/var/www/vhosts...')
#19 {main}
s Exception Occurred: mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and cIsTemplate = 0 and (Packages.pkgHandle <> 'core' or pkgHandle is null or Pa' at line 1] in EXECUTE("select cID from Pages left join Packages on Pages.pkgID = Packages.pkgID where cParentID = and cIsTemplate = 0 and (Packages.pkgHandle <> 'core' or pkgHandle is null or Pages.ctID > 0)")
#0 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1064, 'You have an err...', 'select cID from...', false, Object(ADODB_mysql))
#1 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(1017): ADOConnection->_Execute('select cID from...', false)
#2 /var/www/vhosts/example.com/httpdocs/concrete/libraries/3rdparty/adodb/adodb.inc.php(766): ADOConnection->Execute('select cID from...', false)
#3 [internal function]: ADOConnection->Query('select cID from...')
#4 /var/www/vhosts/example.com/httpdocs/concrete/libraries/database.php(73): call_user_func_array(Array, Array)
#5 [internal function]: Database->__call('query', Array)
#6 /var/www/vhosts/example.com/httpdocs/concrete/models/page.php(803): Database->query('select cID from...')
#7 /var/www/vhosts/example.com/httpdocs/concrete/models/page.php(796): Page->_getNumChildren(NULL, 0)
#8 /var/www/vhosts/example.com/httpdocs/packages/blog/models/blog_post.php(80): Page->getCollectionChildrenArray()
#9 /var/www/vhosts/example.com/httpdocs/packages/blog/blocks/blog_list/controller.php(77): BlogPost::getAllByParentCollectionID('104')
#10 [internal function]: BlogListBlockController->view()
#11 /var/www/vhosts/example.com/httpdocs/concrete/libraries/controller.php(134): call_user_func_array(Array, Array)
#12 /var/www/vhosts/example.com/httpdocs/concrete/libraries/block_controller.php(222): Controller->runTask('view', Array)
#13 /var/www/vhosts/example.com/httpdocs/concrete/libraries/block_view.php(202): BlockController->setupAndRun('view')
#14 /var/www/vhosts/example.com/httpdocs/concrete/models/area.php(363): BlockView->render(Object(Block))
#15 /var/www/vhosts/example.com/httpdocs/themes/gen-next/home.php(51): Area->display(Object(Page))
#16 /var/www/vhosts/example.com/httpdocs/concrete/libraries/view.php(740): include('/var/www/vhosts...')
#17 /var/www/vhosts/example.com/httpdocs/concrete/dispatcher.php(214): View->render(Object(Page))
#18 /var/www/vhosts/example.com/httpdocs/index.php(2): require('/var/www/vhosts...')
#19 {main}
I see the error, cParendID is empty and it should be checked before making the query (grrrr!) But why is it empty?
More info (these aren't meaningless bumps, I'm hoping the details gives someone an aha moment)
I created a second database from a backup from five months ago when the site was working, then changes the config in site.php to point to it. All blog pages are still gone and this causes the home page to lose ALL content (but lo and behold, no errors)
I created a second database from a backup from five months ago when the site was working, then changes the config in site.php to point to it. All blog pages are still gone and this causes the home page to lose ALL content (but lo and behold, no errors)
Hello,
A few questions:
- Did you update from an older version to 5.2.3.1?
- What blog add-on are you using? (or maybe just C5 default blog page type)
A few questions:
- Did you update from an older version to 5.2.3.1?
- What blog add-on are you using? (or maybe just C5 default blog page type)
Thank you, see "don't know diddly about C5" above.
No it hasn't been updated in years.
As for the blog, I am not sure, or even if they were posting correctly - the clients aren't all that technical and can't explain what anyone did or how they did it.
Add Functionality shows Blog - 1.2.3.1RC1. Block types contains
blog list -> edit -> count 8
blog archive -> edit -> count 0 (is that the problem?)
blog tweeetememe -> edit -> count 0
In the dashboard there is only "Blog" at the left menu and it brings up "write new blog post" when followed. The drop down for "This blog will appear under" is an empty select list.
Thanks again for any ideas to sort this out.
No it hasn't been updated in years.
As for the blog, I am not sure, or even if they were posting correctly - the clients aren't all that technical and can't explain what anyone did or how they did it.
Add Functionality shows Blog - 1.2.3.1RC1. Block types contains
blog list -> edit -> count 8
blog archive -> edit -> count 0 (is that the problem?)
blog tweeetememe -> edit -> count 0
In the dashboard there is only "Blog" at the left menu and it brings up "write new blog post" when followed. The drop down for "This blog will appear under" is an empty select list.
Thanks again for any ideas to sort this out.
With what we have now frankly all I can say is that you are using an old version of this blog add-onhttp://www.concrete5.org/marketplace/addons/blog/...
The developer might be willing to help. Technically he should but on something that outdated he might not feel like it. Maybe he could at least tell you if there is an incompatibility between your version of the add-on and of C5.
But in the absence of some indications as to what happened it's kind of hard to tell.
The developer might be willing to help. Technically he should but on something that outdated he might not feel like it. Maybe he could at least tell you if there is an incompatibility between your version of the add-on and of C5.
But in the absence of some indications as to what happened it's kind of hard to tell.
Well, though I'm logged into the C5 site, the marketplace link brings me to another login. Then when I log in, it just returns to the login screen. No warnings, errors, or indication of what's wrong, just returns to the login screen.
It can't be about incompatibility as this is how the site was set up since the start. The original developer is of course MIA. At this point the only solution at hand is to nuke the site and start from scratch.
It can't be about incompatibility as this is how the site was set up since the start. The original developer is of course MIA. At this point the only solution at hand is to nuke the site and start from scratch.
} catch(ADODB_Exception $e) {
// if it's a database exception we go here.
if (Config::get('SITE_DEBUG_LEVEL') == DEBUG_DISPLAY_ERRORS) {
$this->renderError(t('An unexpected error occurred.'), $e->getMessage(), $e);
} else {
$this->renderError(t('An unexpected error occurred.'), t('A database error occurred while processing this request.'), $e);
}
So, why would I get an ADODB exception when the rest of the pages/resources are working normally?