Better Blogs [Deleted]

Looks like I'm getting another server error when trying to make a new entry. It won't post. Looks like this is why no one's blogged in the past two weeks, didn't catch it till now.

Code:
Error Info

Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'last_edit_date' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77

Generated By: admin, 3 minutes ago

Stack Trace

#0 /home/admin/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...')

#1 /home/admin/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...')

#2 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...')

#3 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)

#4 /home/admin/public_html/library/XenForo/DataWriter.php(1612): Zend_Db_Adapter_Abstract->insert('xfa_blog_entry', Array)

#5 /home/admin/public_html/library/XenForo/DataWriter.php(1601): XenForo_DataWriter->_insert()

#6 /home/admin/public_html/library/XenForo/DataWriter.php(1393): XenForo_DataWriter->_save()

#7 /home/admin/public_html/library/XfAddOns/Blogs/ControllerPublic/Blog.php(344): XenForo_DataWriter->save()

#8 /home/admin/public_html/library/XenForo/FrontController.php(337): XfAddOns_Blogs_ControllerPublic_Blog->actionSaveEntry()

#9 /home/admin/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))

#10 /home/admin/public_html/index.php(13): XenForo_FrontController->run()

#11 {main}

Request State

array(3) {

  ["url"] => string(53) "http://www.site.org/blog/daniel.1/save-entry"

  ["_GET"] => array(0) {

  }

  ["_POST"] => array(16) {

    ["title"] => string(30) "Haven't blogged for a while..."

    ["message_html"] => string(1863) "<p>content content content </p><p><br></p><p>So glad it's almost the weekend. Ugh. it's 5:55 a.m.</p>

"

    ["_xfRelativeResolver"] => string(52) "http://www.site.org/blog/daniel.1/new-entry"

    ["attachment_hash"] => string(32) "098d0e165e7df06c2a3ff89f8e53aa22"

    ["post_date"] => string(10) "2013-10-03"

    ["hour"] => string(1) "5"

    ["minute"] => string(2) "55"

    ["second"] => string(2) "45"

    ["allow_comments"] => string(1) "1"

    ["allow_view_entry_enable"] => string(1) "1"

    ["allow_view_entry"] => string(8) "everyone"

    ["allow_members"] => string(0) ""

    ["_xfToken"] => string(8) "********"

    ["_xfRequestUri"] => string(24) "/blog/daniel.1/new-entry"

    ["_xfNoRedirect"] => string(1) "1"

    ["_xfResponseType"] => string(4) "json"

  }

}

Edit - the above is why I tried posting an entry. Also have this in the server error logs (from yesterday):

Code:
Error Info

ErrorException: Undefined offset: 57443 - library/XfAddOns/Blogs/Model/BlogKey.php:44

Generated By: Unknown Account, Yesterday at 9:00 PM

Stack Trace

#0 /home/admin/public_html/library/XfAddOns/Blogs/Model/BlogKey.php(44): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/spider7/p...', 44, Array)

#1 /home/admin/public_html/library/XfAddOns/Blogs/Cron/CreateBlogKeys.php(43): XfAddOns_Blogs_Model_BlogKey->getBlogKey(Array)

#2 /home/admin/public_html/library/XfAddOns/Blogs/Cron/CreateBlogKeys.php(17): XfAddOns_Blogs_Cron_CreateBlogKeys->processKeys()

#3 [internal function]: XfAddOns_Blogs_Cron_CreateBlogKeys::runBlogKeys(Array)

#4 /home/admin/public_html/library/XenForo/Model/Cron.php(356): call_user_func(Array, Array)

#5 /home/admin/public_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)

#6 /home/admin/public_html/library/XenForo/Model/Deferred.php(208): XenForo_Deferred_Cron->execute(Array, Array, 9.99999904633, '')

#7 /home/admin/public_html/library/XenForo/Model/Deferred.php(331): XenForo_Model_Deferred->runDeferred(Array, 9.99999904633, '', false)

#8 /home/admin/public_html/library/XenForo/Model/Deferred.php(284): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)

#9 /home/admin/public_html/deferred.php(18): XenForo_Model_Deferred->run(false)

#10 {main}

Request State

array(3) {

  ["url"] => string(41) "http://www.site.org/deferred.php"

  ["_GET"] => array(0) {

  }

  ["_POST"] => array(4) {

    ["_xfRequestUri"] => string(1) "/"

    ["_xfNoRedirect"] => string(1) "1"

    ["_xfToken"] => string(8) "********"

    ["_xfResponseType"] => string(4) "json"

  }

}
Your database structure does not match the files. If you just uploaded the PHP files without uploading the xml file, that could be the cause
 
That's a robot hitting the "edit entry" link, and getting an error because .. well, it would not have permissions
It just shouldn't be reported in the logs

I do not recommend attempting to downgrade, or you risk corrupting your installation
How is a robot hitting that link? That link is hidden from guests.
 
Last edited:
I test blogs, and I have no errors. If works for me, and doesn't work for you, it can cause you?
Unless you can decipher error codes like this, sit and wait like me for someone else who can.

Error Info Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: 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 ') ORDER BY user_id ASC, display_order ASC' at line 6 - library/Zend/Db/Statement/Mysqli.php:77 Generated By: Unknown Account, 28 minutes ago Stack Trace #0 /home/blah/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????SELECT?????...') #1 /home/blah/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????SELECT?????...') #2 /home/blah/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????SELECT?????...') #3 /home/blah/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('????SELECT?????...', Array, 2) #4 /home/blah/public_html/library/XfAddOns/Blogs/Model/Category.php(238): XenForo_Model->fetchAllKeyed('????SELECT?????...', 'category_id') #5 /home/blah/public_html/library/XfAddOns/Blogs/Model/Category.php(175): XfAddOns_Blogs_Model_Category->getCategoriesForBlogs(Array, Array) #6 /home/blah/public_html/library/XfAddOns/Blogs/ControllerPublic/BlogCategory.php(202): XfAddOns_Blogs_Model_Category->getCategoriesForSelectBox(NULL) #7 /home/blah/public_html/library/XenForo/FrontController.php(337): XfAddOns_Blogs_ControllerPublic_BlogCategory->actionEditOverlay() #8 /home/blah/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #9 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #10 {main} Request State array(3) { ["url"] => string(64) "https://8thos.com/xfa-blog-category/spirituality.29/edit-overlay" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 
Your database structure does not match the files. If you just uploaded the PHP files without uploading the xml file, that could be the cause

I haven't gotten this error before. Maybe an error during a version upgrade? I'll try re-uploading the latest .xml file, but I'm pretty sure it's all up-to-date.

If this is the cause, uploading the most recent .xml should fix it, right?
 
Last edited:
Upgraded both the files and .xml file to the latest version 1.0.31 and am still getting the Mysqli prepare error: Unknown column 'last_edit_date' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77 error when trying to post an entry.
 
Upgraded both the files and .xml file to the latest version 1.0.31 and am still getting the Mysqli prepare error: Unknown column 'last_edit_date' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77 error when trying to post an entry.
Just upgraded my site to 1.0.31 and after seeing this went to test it... was able to make a new entry with no problem so it's not an overall add-on error. Appears to be specific to your site.
If you have access to phpMyAdmin then go into your database and table xfa_blog_entry see if you have a last_edit_date column.

EDIT:
I take no responsibility (since I'm learning mySQL related stuff myself so you need to verify this) but if that column does not exist the this should make it (from phpMyAdmin when you are using your forum DB)
Code:
ALTER TABLE xfa_blog_entry ADD last_edit_date INT(10) AFTER allow_members;
 
Last edited:
If you happen to be using xenFoogle Pro style with Better Blogs, you will find that you have two "Create Entry" buttons. To resolve this, place in EXTRA.css (so far, these are the ones I have found - originally @Steve F had helped find the solution to the _home one but there were more present).

Code:
/* Better Blogs by Rigel */
.xfa_blog_list  aside .topCtrl, .xfa_blog_index  aside .topCtrl, .xfa_blog_home  aside .topCtrl
{
    display: none;
}

.titleBar .topCtrl
{
    margin-top: -25px;
}
 
@Rigel Kentaurus, I've looked and read and keep seeing references to the BD Widget references, but cannot find the widgets anywhere to import. I may have overlooked them in the 52 pages of entries. Should they not be in the archive or do you now have to create your own widget for this add-on?

You can disregard... for some reason they were not showing but now they are. May have been due to a caching issue.
 
Last edited:
1. quantity latest comments too much. I installed the last 3 comments.

2. In the categories no number of subjects. Does not work search by categories here.blog1.webp
blog3.webp
 
Last edited:
Just upgraded my site to 1.0.31 and after seeing this went to test it... was able to make a new entry with no problem so it's not an overall add-on error. Appears to be specific to your site.
If you have access to phpMyAdmin then go into your database and table xfa_blog_entry see if you have a last_edit_date column.

EDIT:
I take no responsibility (since I'm learning mySQL related stuff myself so you need to verify this) but if that column does not exist the this should make it (from phpMyAdmin when you are using your forum DB)
Code:
ALTER TABLE xfa_blog_entry ADD last_edit_date INT(10) AFTER allow_members;

Thanks! I took a backup and ran the query. Got this error now and still can't post:

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'last_edit_user_id' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Daniel, A moment ago
Stack Trace
#0 /home/admin/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...')
#1 /home/admin/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...')
#2 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...')
#3 /home/admin/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#4 /home/admin/public_html/library/XenForo/DataWriter.php(1612): Zend_Db_Adapter_Abstract->insert('xfa_blog_entry', Array)
#5 /home/admin/public_html/library/XenForo/DataWriter.php(1601): XenForo_DataWriter->_insert()
#6 /home/admin/public_html/library/XenForo/DataWriter.php(1393): XenForo_DataWriter->_save()
#7 /home/admin/public_html/library/XfAddOns/Blogs/ControllerPublic/Blog.php(365): XenForo_DataWriter->save()
#8 /home/admin/public_html/library/XenForo/FrontController.php(337): XfAddOns_Blogs_ControllerPublic_Blog->actionSaveEntry()
#9 /home/admin/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/admin/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(53) "http://www.writingforums.org/blog/daniel.1/save-entry"
["_GET"] => array(0) {
}
["_POST"] => array(17) {
["title"] => string(30) "Haven't blogged for a while..."
["message_html"] => string(1863) "<p> Content- content. Ugh. it's 5:55 a.m.</p>
"
["_xfRelativeResolver"] => string(52) "http://www.site.org/blog/daniel.1/new-entry"
["attachment_hash"] => string(32) "dfbdd6df31c7744325afddd8d0d031ec"
["post_date"] => string(10) "2013-10-02"
["hour"] => string(1) "5"
["minute"] => string(1) "5"
["second"] => string(2) "17"
["category"] => array(1) {
[0] => string(4) "1488"
}
["allow_comments"] => string(1) "1"
["allow_view_entry_enable"] => string(1) "1"
["allow_view_entry"] => string(8) "everyone"
["allow_members"] => string(0) ""
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(24) "/blog/daniel.1/new-entry"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Thanks! I took a backup and ran the query. Got this error now and still can't post:

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'last_edit_user_id' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77

Try
Code:
ALTER TABLE xfa_blog_entry ADD last_edit_user_id INT(10) AFTER last_edit_date;

Looks like you don't have all the necessary DB entries for it. You may end up with even more problems if the DB is not valid for the add-on.
 
I'm still getting this error which I reported here (link) and I can reproduce it on your site still http://xfaddons.com/blog-category/the-xfaddons-site.14/edit-overlay

Error Info
PHP:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: 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 ') ORDER BY user_id ASC, display_order ASC' at line 6 - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 10:22 PM
Stack Trace
PHP:
#0 /home/www/public_html/forums/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('????SELECT?????...')
#1 /home/www/public_html/forums/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '????SELECT?????...')
#2 /home/www/public_html/forums/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('????SELECT?????...')
#3 /home/www/public_html/forums/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('????SELECT?????...', Array, 2)
#4 /home/www/public_html/forums/library/XfAddOns/Blogs/Model/Category.php(238): XenForo_Model->fetchAllKeyed('????SELECT?????...', 'category_id')
#5 /home/www/public_html/forums/library/XfAddOns/Blogs/Model/Category.php(175): XfAddOns_Blogs_Model_Category->getCategoriesForBlogs(Array, Array)
#6 /home/www/public_html/forums/library/XfAddOns/Blogs/ControllerPublic/BlogCategory.php(202): XfAddOns_Blogs_Model_Category->getCategoriesForSelectBox(NULL)
#7 /home/www/public_html/forums/library/XenForo/FrontController.php(337): XfAddOns_Blogs_ControllerPublic_BlogCategory->actionEditOverlay()
#8 /home/www/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/www/public_html/forums/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
PHP:
array(3) {
  ["url"] => string(81) "http://www.sociallyuncensored.eu/forums/xfa-blog-category/politics.9/edit-overlay"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
That update broke my all blogs list.

Mysqli prepare error: Unknown column 'xfa_blog_entry.allow_members' in 'field list' Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115 Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381 Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478 Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219 XenForo_Model->fetchAllKeyed() in XfAddOns/Blogs/Model/Blog.php at line 300 XfAddOns_Blogs_Model_Blog->getBlogList() in XfAddOns/Blogs/ControllerPublic/BlogList.php at line 40 XfAddOns_Blogs_ControllerPublic_BlogList->actionIndex() in XenForo/FrontController.php at line 337 XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134 XenForo_FrontController->run() in /home/blah/public_html/index.php at line 13
 
lol @ what just happened to my blog listing. I can't see the titles of my blogs anymore wtf?

Edit I fixed it by editing this template: xfa_blog_entry_bit.css
 
Last edited:
Top Bottom