[TH] Library [Deleted]

Can someone point me to the correct template and/or code to set library templates to default to alphabetic order rather than created date? (Yes I know this can be user defined, I'd like to change the default)
 
Great idea, I would love to see
  • likes & comments for the articles
  • option to show/hide the pages links on thread view
  • views/likes/comments/pages counts on the thread list page
  • being able to sort the thread list by views/likes/comments counts
 
today i found many many errors of this addon. here are some.

Code:
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 'DESC LIMIT 20' at line 9 - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 1:44 AM
Stack Trace
#0 /home/xxxxx/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#1 /home/xxxxx/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\n\t\t\t\tSSLLCT  ...')
#2 /home/xxxxx/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#3 /home/xxxxx/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\r\n\n\t\t\t\tSSLLCT  ...', Array, 2)
#4 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(280): XenForo_Model->fetchAllKeyed('\r\n\n\t\t\t\tSSLLCT  ...', 'article_id')
#5 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(295): Waindigo_Library_Model_Article->getArticles(Array, Array)
#6 /home/xxxxx/public_html/library/Waindigo/Library/ControllerPublic/Library.php(78): Waindigo_Library_Model_Article->getArticlesInLibrary(212, Array, Array)
#7 /home/xxxxx/public_html/library/XenForo/FrontController.php(347): Waindigo_Library_ControllerPublic_Library->actionIndex()
#8 /home/xxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/xxxxx/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(97) "http://www.xxxxx.com/libraries/xxx.212/?order=%27+OR+%271%27%3d%271"
  ["_GET"] => array(1) {
    ["order"] => string(11) "' OR '1'='1"
  }
  ["_POST"] => array(0) {
  }
}



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 'DESC LIMIT 20' at line 9 - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 1:44 AM
Stack Trace
#0 /home/xxxxx/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#1 /home/xxxxx/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\n\t\t\t\tSSLLCT  ...')
#2 /home/xxxxx/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#3 /home/xxxxx/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\r\n\n\t\t\t\tSSLLCT  ...', Array, 2)
#4 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(280): XenForo_Model->fetchAllKeyed('\r\n\n\t\t\t\tSSLLCT  ...', 'article_id')
#5 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(295): Waindigo_Library_Model_Article->getArticles(Array, Array)
#6 /home/xxxxx/public_html/library/Waindigo/Library/ControllerPublic/Library.php(78): Waindigo_Library_Model_Article->getArticlesInLibrary(212, Array, Array)
#7 /home/xxxxx/public_html/library/XenForo/FrontController.php(347): Waindigo_Library_ControllerPublic_Library->actionIndex()
#8 /home/xxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/xxxxx/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(363) "http://www.xxxxxxxxxx/libraries/xxx.212/?order=-1%22+and+6%3d3+or+1%3d1%2b(SELECT+1+and+ROW(1%2c1)%3e(SELECT+COUNT(*)%2cCONCAT(CHAR(95)%2cCHAR(33)%2cCHAR(64)%2cCHAR(52)%2cCHAR(100)%2cCHAR(105)%2cCHAR(108)%2cCHAR(101)%2cCHAR(109)%2cCHAR(109)%2cCHAR(97)%2c0x3a%2cFLOOR(RAND(0)*2))x+FROM+INFORMATION_SCHEMA.COLLATIONS+GROUP+BY+x)a)%2b%22"
  ["_GET"] => array(1) {
    ["order"] => string(245) "-1" and 6=3 or 1=1+(SELECT 1 and ROW(1,1)>(SELECT COUNT(*),CONCAT(CHAR(95),CHAR(33),CHAR(64),CHAR(52),CHAR(100),CHAR(105),CHAR(108),CHAR(101),CHAR(109),CHAR(109),CHAR(97),0x3a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.COLLATIONS GROUP BY x)a)+""
  }
  ["_POST"] => array(0) {
  }
}



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 'DESC LIMIT 20' at line 9 - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 1:44 AM
Stack Trace
#0 /home/xxxxx/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#1 /home/xxxxx/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\n\t\t\t\tSSLLCT  ...')
#2 /home/xxxxx/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\n\t\t\t\tSSLLCT  ...')
#3 /home/xxxxx/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\r\n\n\t\t\t\tSSLLCT  ...', Array, 2)
#4 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(280): XenForo_Model->fetchAllKeyed('\r\n\n\t\t\t\tSSLLCT  ...', 'article_id')
#5 /home/xxxxx/public_html/library/Waindigo/Library/Model/Article.php(295): Waindigo_Library_Model_Article->getArticles(Array, Array)
#6 /home/xxxxx/public_html/library/Waindigo/Library/ControllerPublic/Library.php(78): Waindigo_Library_Model_Article->getArticlesInLibrary(212, Array, Array)
#7 /home/xxxxx/public_html/library/XenForo/FrontController.php(347): Waindigo_Library_ControllerPublic_Library->actionIndex()
#8 /home/xxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/xxxxx/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(122) "http://www.xxxxxxxxxx/libraries/xxx.212/?order=%27%3e%3cnet+sparker%3dnetsparker(0x006227)%3e"
  ["_GET"] => array(1) {
    ["order"] => string(36) "'><net sparker=netsparker(0x006227)>"
  }
  ["_POST"] => array(0) {
  }
}

i have temporarily disable the addon now

library ver 1.3.9 xf ver 1.3.0
 
Last edited:
Thank you for this great addon!

I have two questions. Perhaps one can find a solution in this threat, but I am to lazy to search in 320 Postings.
1) The text I can post is limited to 10.000 characters. Is there a possibility to set it to a higher value?
2) How can I create multiple pages?

Matthias
 
Getting the following error when trying to delete an article:

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Column 'content_type' cannot be null - library/Zend/Db/Statement/Mysqli.php:214
Generated By: me A moment ago
Stack Trace
#0 /home/talkbass/html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/talkbass/html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/talkbass/html/library/XenES/Model/Elasticsearch.php(301): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tINSERT INT...', Array)
#3 /home/talkbass/html/library/XenES/Search/SourceHandler/ElasticSearch.php(960): XenES_Model_Elasticsearch->logFailedIndex('delete', NULL, NULL, NULL, 0)
#4 /home/talkbass/html/library/XenES/Search/SourceHandler/ElasticSearch.php(113): XenES_Search_SourceHandler_ElasticSearch->_logFailedIndex('delete', NULL, NULL)
#5 /home/talkbass/html/library/XenForo/Search/Indexer.php(105): XenES_Search_SourceHandler_ElasticSearch->deleteFromIndex('article_page', Array)
#6 /home/talkbass/html/library/Waindigo/Library/Search/DataHandler/ArticlePage.php(68): XenForo_Search_Indexer->deleteFromIndex('article_page', Array)
#7 /home/talkbass/html/library/XenForo/Search/DataHandler/Abstract.php(315): Waindigo_Library_Search_DataHandler_ArticlePage->_deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#8 /home/talkbass/html/library/XenForo/DataWriter/Discussion.php(707): XenForo_Search_DataHandler_Abstract->deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#9 /home/talkbass/html/library/XenForo/DataWriter/Discussion.php(759): XenForo_DataWriter_Discussion->_deleteFromSearchIndex()
#10 /home/talkbass/html/library/XenForo/DataWriter.php(1779): XenForo_DataWriter_Discussion->_postDelete()
#11 /home/talkbass/html/library/Waindigo/Library/ControllerPublic/Article.php(494): XenForo_DataWriter->delete()
#12 /home/talkbass/html/library/XenForo/FrontController.php(347): Waindigo_Library_ControllerPublic_Article->actionDelete()
#13 /home/talkbass/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#14 /home/talkbass/html/index.php(13): XenForo_FrontController->run()
#15 {main}
Request State
array(3) {
["url"] => string(76) "http://www.talkbass.com/library-articles/ampeg-portaflex-test-1-2-3.1/delete"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["reason"] => string(7) "testing"
["hard_delete"] => string(1) "0"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
 
Getting the following error when trying to delete an article:

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Column 'content_type' cannot be null - library/Zend/Db/Statement/Mysqli.php:214
Generated By: me A moment ago
Stack Trace
#0 /home/talkbass/html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/talkbass/html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/talkbass/html/library/XenES/Model/Elasticsearch.php(301): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tINSERT INT...', Array)
#3 /home/talkbass/html/library/XenES/Search/SourceHandler/ElasticSearch.php(960): XenES_Model_Elasticsearch->logFailedIndex('delete', NULL, NULL, NULL, 0)
#4 /home/talkbass/html/library/XenES/Search/SourceHandler/ElasticSearch.php(113): XenES_Search_SourceHandler_ElasticSearch->_logFailedIndex('delete', NULL, NULL)
#5 /home/talkbass/html/library/XenForo/Search/Indexer.php(105): XenES_Search_SourceHandler_ElasticSearch->deleteFromIndex('article_page', Array)
#6 /home/talkbass/html/library/Waindigo/Library/Search/DataHandler/ArticlePage.php(68): XenForo_Search_Indexer->deleteFromIndex('article_page', Array)
#7 /home/talkbass/html/library/XenForo/Search/DataHandler/Abstract.php(315): Waindigo_Library_Search_DataHandler_ArticlePage->_deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#8 /home/talkbass/html/library/XenForo/DataWriter/Discussion.php(707): XenForo_Search_DataHandler_Abstract->deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#9 /home/talkbass/html/library/XenForo/DataWriter/Discussion.php(759): XenForo_DataWriter_Discussion->_deleteFromSearchIndex()
#10 /home/talkbass/html/library/XenForo/DataWriter.php(1779): XenForo_DataWriter_Discussion->_postDelete()
#11 /home/talkbass/html/library/Waindigo/Library/ControllerPublic/Article.php(494): XenForo_DataWriter->delete()
#12 /home/talkbass/html/library/XenForo/FrontController.php(347): Waindigo_Library_ControllerPublic_Article->actionDelete()
#13 /home/talkbass/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#14 /home/talkbass/html/index.php(13): XenForo_FrontController->run()
#15 {main}
Request State
array(3) {
["url"] => string(76) "http://www.talkbass.com/library-articles/ampeg-portaflex-test-1-2-3.1/delete"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["reason"] => string(7) "testing"
["hard_delete"] => string(1) "0"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
May be a bug with Enhanced Search. Do you have any issues deleting any other content (e.g., threads)?
 
I'm getting lots of these template errors when I edit a Library node in AdminCP :
Template Errors: waindigo_node_select_library
  1. Illegal string offset 'node_id' in path\to\xenforo\library\XenForo\Template\Abstract.php(265) : eval()'d code, line 24:
    23: $__output .= '
    24: <option value="' . htmlspecialchars($node['node_id'], ENT_QUOTES, 'UTF-8') . '"' . (($node['node_id'] == $field['field_value']['node_id']) ? ' selected="selected"' : '') . '>&nbsp; &nbsp;' . htmlspecialchars($node['title'], ENT_QUOTES, 'UTF-8') . '</option>
    25:
2...​
34 of them, actually, certainly corresponding to the number of nodes on my site.

I have not looked really further, but it seems $field['field_value'] is not unserialized in Waindigo_Library_Helper_CustomField::render, which is why the error occurs. I added an ugly
PHP:
if (unserialize($field['field_value'])) {
            $field['field_value'] = unserialize($field['field_value']);
        }
at line 58 in library/Waindigo/Library/Helper/CustomField.php and the errors went away.

Both CustomFields and Library add-ons are up to date.
 
Top Bottom