[TH] Library [Deleted]

I'm really enjoying the possibilities of using libraries to display information that would otherwise be tucked away in the forums. Although not strictly a problem I can't find a way to get notices to show up in a library node. I know the system was never designed to accommodate them but is there any way of making them show up?

I had an idea to make good use of notices throughout my site but I may have to rethink it. Or possibly just display a static banner above the library information...
 
Just tried to create a new article on my site, and when trying to submit the article, I'm getting the below error:

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Incorrect string value: '\xC2\x92t be...' for column 'message' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Matt, 4 minutes ago

Stack Trace
Code:
#0 /home/z22se/public_html/forum/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/z22se/public_html/forum/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/z22se/public_html/forum/library/Zend/Db/Adapter/Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_arti...', Array)
#3 /home/z22se/public_html/forum/library/XenForo/DataWriter.php(1607): Zend_Db_Adapter_Abstract->update('xf_article_page', Array, 'article_page_id...')
#4 /home/z22se/public_html/forum/library/XenForo/DataWriter.php(1576): XenForo_DataWriter->_update()
#5 /home/z22se/public_html/forum/library/XenForo/DataWriter.php(1381): XenForo_DataWriter->_save()
#6 /home/z22se/public_html/forum/library/Waindigo/Library/ControllerPublic/ArticlePage.php(205): XenForo_DataWriter->save()
#7 /home/z22se/public_html/forum/library/XenForo/FrontController.php(310): Waindigo_Library_ControllerPublic_ArticlePage->actionSave()
#8 /home/z22se/public_html/forum/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/z22se/public_html/forum/index.php(13): XenForo_FrontController->run()
#10 {main}

Request State
Code:
array(3) {
  ["url"] => string(50) "http://www.z22se.co.uk/forum/article-pages/25/save"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["message_html"] => string(3092) "<p>You’ll need:</p>
<p>Total Closure Module</p>
<p>Screwdrivers T20 &amp; Small Flathead</p>
<p>Soldering Iron &amp; Solder</p>
<p>Wire Strippers</p>
<p>Insulating Tape</p>
<p>Sharp Knife</p>
<p>&nbsp;</p>
<p>Can you fit Total Closure?</p>
<p>These units can only be fitted if, when locking the car turn the key towards the back of the car then hold the key in that position for approximately five seconds and the windows go up. If not then this kit can’t be fitted.</p>
<p>&nbsp;</p>
<p>Fitting</p>
<p>To remove the kick panel prise out the cap as shown below and remove the screw by using a Torx driver.</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7692-69058e9ed315503db4cc0abc4c5581f2.jpg" alt="attachThumb8387" /> </p>
<p>&nbsp;</p>
<p>The next bit requires patience, as the kick panel is fiddly to remove, some people have removed the Bonnet release catch, however I didn’t, and managed to remove the panel.</p>
<p>Once the panel is removed you should see the Central Locking and Electric Window Module.</p>
<p>&nbsp;</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7693-3ec702aa3b9886df9ed25e1d1379ff6e.jpg" alt="attachThumb8388" /> </p>
<p>&nbsp;</p>
<p>Looking at the module there is a 24pin connector on the left and a 12pin on the right. Within the 24pin connector there should be a BLUE wire with a BLACK Stripe this the Deadlocking activation wire. Connect the BLUE to this.</p>
<p>&nbsp;</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7694-c34a30a38028e0a64df30c78f7a445a0.jpg" alt="attachThumb8389" /> </p>
<p>&nbsp;</p>
<p>Then on the same connector there should be a BROWN wire with a Black stripe or a YELLOW wire with a Red Stripe depending on what model and year you car is. This is the wire that when activated closes the electric windows. The position of the wire is shown below</p>
<p>&nbsp;</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7695-34bf47fd603de3fc3cf3f943fbbd6d41.jpg" alt="attachThumb8390" /> </p>
<p>&nbsp;</p>
<p>Connect the RED power lead to the Large Red Wire that goes to the 12pin plug as shown in the diagram below.</p>
<p>&nbsp;</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7696-c34a30a38028e0a64df30c78f7a445a0.jpg" alt="attachThumb8391" /> </p>
<p>&nbsp;</p>
<p>As with all the connections I opted not to use the “Scotch Blocks” as this type of connection can be unreliable therefore I stripe the sheath on the wire and soldered the closure wires to them. As shown above with the power lead.</p>
<p>Connect the Black earth lead to the earth stud (Shown Below)</p>
<p><img class="attachThumb bbCodeImage" src="data/attachments/7/7697-048d1065e6d80d39bd3adcd9056a0139.jpg" alt="attachThumb8392" /> </p>
<p>&nbsp;</p>
<p>Now open all windows, step out of the car and shut the door, press the remote control to lock and alarm then within 10 seconds press the lock button to deadlock and after 2 seconds the windows should start to close.</p>
<p>If it all works replace the kick panel. Job Done.</p>"
    ["_xfRelativeResolver"] => string(50) "http://www.z22se.co.uk/forum/article-pages/25/edit"
    ["attachment_hash"] => string(32) "fe631504d9f16f14a6e3f848d8c89ef6"
    ["_xfToken"] => string(53) "1,1339442393,a8c72a5fb9cd2f74fc411ea2f2e8e24514646e21"
    ["_xfRequestUri"] => string(28) "/forum/article-pages/25/edit"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

This is what I'm trying to insert into the page:
You’ll need:
Total Closure Module
Screwdrivers T20 & Small Flathead
Soldering Iron & Solder
Wire Strippers
Insulating Tape
Sharp Knife

You’ll need:
Total Closure Module
Screwdrivers T20 & Small Flathead
Soldering Iron & Solder
Wire Strippers
Insulating Tape
Sharp Knife

Can you fit Total Closure?
These units can only be fitted if, when locking the car turn the key towards the back of the car then hold the key in that position for approximately five seconds and the windows go up. If not then this kit can’t be fitted.

Fitting
To remove the kick panel prise out the cap as shown below and remove the screw by using a Torx driver.

The next bit requires patience, as the kick panel is fiddly to remove, some people have removed the Bonnet release catch, however I didn’t, and managed to remove the panel.
Once the panel is removed you should see the Central Locking and Electric Window Module.

Looking at the module there is a 24pin connector on the left and a 12pin on the right. Within the 24pin connector there should be a BLUE wire with a BLACK Stripe this the Deadlocking activation wire. Connect the BLUE to this.

Then on the same connector there should be a BROWN wire with a Black stripe or a YELLOW wire with a Red Stripe depending on what model and year you car is. This is the wire that when activated closes the electric windows. The position of the wire is shown below

Connect the RED power lead to the Large Red Wire that goes to the 12pin plug as shown in the diagram below.

As with all the connections I opted not to use the “Scotch Blocks” as this type of connection can be unreliable therefore I stripe the sheath on the wire and soldered the closure wires to them. As shown above with the power lead.
Connect the Black earth lead to the earth stud (Shown Below)

Now open all windows, step out of the car and shut the door, press the remote control to lock and alarm then within 10 seconds press the lock button to deadlock and after 2 seconds the windows should start to close.
If it all works replace the kick panel. Job Done.
 
This is what happened on submit
View attachment 30442

and I've now got loads of articles listed which don't work
View attachment 30443

View attachment 30444
I think this is an issue with the way the tables are being saved. For all of our add-on's, we are bringing our database tables in line with those created by XenForo (rather than using the defaults set by your MySql server). This is being gradually rolled out and you should see this fixed in the next version of this add-on.

The next version will also include the ability to delete dead articles like the above.

I am hoping to release the next version in the next few days...
 
Thanks Jon.

Is it safe to manually delete these broken articles from the database?

Code:
mysql> SELECT article_id, title FROM xf_article WHERE title LIKE "Fit Total Closure Module";
+------------+--------------------------+
| article_id | title                    |
+------------+--------------------------+
|         25 | Fit Total Closure Module |
|         26 | Fit Total Closure Module |
|         27 | Fit Total Closure Module |
|         28 | Fit Total Closure Module |
|         29 | Fit Total Closure Module |
|         30 | Fit Total Closure Module |
|         31 | Fit Total Closure Module |
|         32 | Fit Total Closure Module |
+------------+--------------------------+
8 rows in set (0.00 sec)
Code:
mysql> SELECT article_page_id, article_id FROM xf_article_page WHERE article_id LIKE "33";
+-----------------+------------+
| article_page_id | article_id |
+-----------------+------------+
|              25 |         33 |
+-----------------+------------+
1 row in set (0.00 sec)
 
Yer, that should be fine. You might want to rebuild the Library caches using the Rebuild Caches tool in the Admin CP after to fix your post count though.
 
Waindigo updated Library by Waindigo with a new update entry:

Version 1.2.5 released

New features:
  • Added ability to mark articles as 'sticky'.
  • Now possible to delete empty articles (caused by errors in previous version, but hopefully not this one).
Bug fixes:
  • Fixed template error resulting in extra white space on Chrome browser.
  • Fixed error that articles could not be unlinked from threads.
  • Fixed some inconsistency issues with 'Latest:' box not showing the latest thread.
  • Articles are now created as full transactions to avoid...

Read the rest of this update entry...
 
Due to a number of bugs in the previous release, I have completely re-written some portions of the Library add-on. As such, the release of new features is being staged in order that I can ensure that the new re-written code is stable.

I have tested the new update thoroughly, but I can't test every possible combination of permissions and forum set up, so please let me know if there are any bugs or errors, and I will try and fix them as soon as possible.

Once I am satisfied with the stability of this version, work will begin on the remaining Stage 2 and the upcoming Stage 3 features.
 
Why does this latest update completely break a website after uploading the files to the server? Before even installing the addon. This is the only addon on xenforo that I've seen will break the website after uploading it.
 
This is the only addon on xenforo.com that breaks the site after uploading it to the server though. Can you fix that?
I highly doubt that. What do you mean by breaks the site? I will see if I can add something to auto-disable the add-on if it sees that files have been uploaded without the add-on being upgraded.
 
I did notice an error once I'd uploaded the new files, but running the install file fixed it.....which IMO is to be expected if it's been re-written to an extent.

EDIT:
Upgraded the library on my test board as well, and this is the error you get as soon as you upload the files to the server (before running the upgrade script)

Server Error
Mysqli prepare error: Table 'worthy_testforum.xf_library_read' doesn't exist
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 218
  5. XenForo_Model->fetchAllKeyed() in Waindigo/Library/Model/Library.php at line 77
  6. Waindigo_Library_Model_Library->getExtraLibraryDataForNodes() in Waindigo/Library/NodeHandler/Library.php at line 172
  7. Waindigo_Library_NodeHandler_Library->getExtraDataForNodes() in XenForo/Model/Node.php at line 565
  8. XenForo_Model_Node->mergeExtraNodeDataIntoNodeList() in XenForo/Model/Node.php at line 754
  9. XenForo_Model_Node->getNodeDataForListDisplay() in XenForo/ControllerPublic/Index.php at line 12
  10. XenForo_ControllerPublic_Index->actionIndex() in EWRporta/ControllerPublic/Index.php at line 9
  11. EWRporta_ControllerPublic_Index->actionIndex() in XenForo/FrontController.php at line 310
  12. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  13. XenForo_FrontController->run() in /home/worthy/public_html/forum/index.php at line 13
 
I'm still getting the same error as previously mentioned when trying to post that article

Mysqli statement execute error : Incorrect string value: '\xC2\x92t be...' for column 'message' at row 1

I've managed to figure what parts of the pasted text are causing the problem. I've pasted it into Notepad++, and using UTF8 without BOM, there are some words showing with a ? inside a box!

article.webp

I've manually deleted these, and put the proper characters in there ' and " and it works fine.

I will say though, that rather than saving the faulty article with no content, the library mod shows the error, and doesn't save this time (y)
 
The errors

Hi Waindigo

Im sorry but your template waindigo_thread_view_tabs_library had hardcoded language
HTML:
<xen:if is="{$article}">
    <xen:require css="waindigo_article_view_library.css" />
    <ul class="tabs articleTabs">
        <li><a href="{xen:link library-articles, $article}">[B]Article[/B]</a></li>
        <li class="active"><a href="{xen:link threads, $thread}">[B]Discussion[/B]</a></li>
    </ul>
</xen:if>

Are you able to change this into phrases, please ;)

Thanks a lot

and

Hi Waindigo

You are very fast. ;)
Found the next small mistake

View attachment 29931

still exist in 1.2.5 ...
 
The errors still exist in 1.2.5 ...
Oops. Thanks for pointing that out.

I'm still getting the same error as previously mentioned when trying to post that article

Mysqli statement execute error : Incorrect string value: '\xC2\x92t be...' for column 'message' at row 1

I've managed to figure what parts of the pasted text are causing the problem. I've pasted it into Notepad++, and using UTF8 without BOM, there are some words showing with a ? inside a box!

View attachment 30539

I've manually deleted these, and put the proper characters in there ' and " and it works fine.

I will say though, that rather than saving the faulty article with no content, the library mod shows the error, and doesn't save this time (y)
Glad we're not getting faulty articles, but sad that it is not fixed. I will have another play...
 
Also noticed in the latest version, that the "Summary" isn't being saved with the rest of the article on creation.

I'm currently having to go back into the article once it's been created, edit article, and then it saves the Summary
 
Installed and created a test library but when I try to visit that library from forum front end i just get the following error (all other forum pages/post etc are fine)

503 Service Unavailable


UPDATE

Works with Nodes As Tabs installed.
 
Top Bottom