• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Book breaks when edited

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Book breaks when edited

    • Issue Tools
      • View Changes
    1. issueid=519 April 23, 2009 1:39 AM
      Entriple Entriple is offline
      New Member
      Book breaks when edited

      So I created a Book under the appropriate namespace, then added a few chapters to it. All was fine until I chose to edit the text of the book, at which point the chapters now point to a non existent book and the book lost association with having any chapters also.

      Secondly, I'm often finding that if I edit an existing article, it is changing the article content to something like [ redirect]asdasd[ /redirect]

      Please help.
    Issue Details
    Issue Number 519
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Books / Chapters
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 2.2.3 Patch Level 1
    Fixed Version 2.2.3 Patch Level 1
    Milestone VaultWiki 2.3.0
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 23, 2009 3:32 AM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs for fresh installs of 2.2.2 - 2.2.3 PL 1 only. The ZIP has been updated for future downloads.

      If anyone downloaded one of these versions before 28 April 2009 (unless it was 2.2.3 PL 1), download the latest build and upgrade.

      After making sure your version is up-to-date, go to AdminCP -> Plugins & Products -> Product Manager. Edit "CES VaultWiki". Under version, enter "2.2.3". Save, then import the product file again (Allow Overwrite = yes). This should trick it into trying to install the patch level part again.

      You will need to delete the articles that say "[redirect]adsga[/redirect]". Then, go to AdminCP -> CES VaultWiki -> Namespace Manager. Find the namespaces that you deleted articles from, and click "Rebuild" for each one. Hopefully that will rescue your Book associations.
      Reply Reply  
    2. April 23, 2009 3:19 PM
      Entriple Entriple is offline
      New Member
      Thanks, that appears to have fixed it. I also get the occasional error when editing pages like so:
      Code:
      Database error in vBulletin 3.7.0
      
      Invalid SQL:
      
      			SELECT thread.threadid
      			FROM thread AS thread
      			LEFT JOIN vault_link AS link ON (thread.firstpostid = link.postid)
      			WHERE thread.threadid IN (115055)
      				AND link.redirect = 1
      				AND link.targetid IN ()
      			GROUP BY thread.threadid;
      
      MySQL 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 ')
      			GROUP BY thread.threadid' at line 6
      Error Number  : 1064
      Reply Reply  
    3. April 23, 2009 5:44 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks. To me it looks like this can only happen when creating a new page (perhaps only when previewing it) that includes a link to another article that wasn't created yet and also includes un-linked text that matches the title of an existing article. Can you confirm this condition?
      Reply Reply  
    4. April 23, 2009 5:59 PM
      Entriple Entriple is offline
      New Member
      It seems to happen whenever I edit an article with only an img tag in it.

      I also appear to get an automatic redirect text whenever I edit any article, regardless of what it is.

      I also quite regularly get an error saying the thread I'm editing is a duplicate of a thread I've already created, even though the text is different.

      This is strange, I created an article, then deleted it. I then recreated it with some text, then editted it and got this error:
      Code:
      Invalid SQL:
      
      			SELECT thread.threadid
      			FROM thread AS thread
      			LEFT JOIN vault_link AS link ON (thread.firstpostid = link.postid)
      			WHERE thread.threadid IN (115161)
      				AND link.redirect = 1
      				AND link.targetid IN ()
      			GROUP BY thread.threadid;
      
      MySQL 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 ')
      			GROUP BY thread.threadid' at line 6
      Error Number  : 1064
      Reply Reply  
    5. April 23, 2009 6:23 PM
      pegasus pegasus is offline
      VaultWiki Team
      You are getting an automatic redirect because of the issue you originally reported. You are getting the "duplicate of a thread" error because it keeps automatically trying to create it every time you edit. If you followed the directions above to re-apply the patch, this should have stopped occurring.

      As for your DB error, it would have nothing to do with the IMG tag. It is interacting with the plaintext in your article to result in this. In vault/special_plugins_bbcode.php, find:
      PHP Code:
      $vbulletin->options['vault_autolinks'] AND 
      This should occur twice. Only change the first one. After the first one, add:
      PHP Code:
      $linkid AND 
      Reply Reply  
    6. April 23, 2009 7:35 PM
      Entriple Entriple is offline
      New Member
      I patched the file as you suggested and now get the following error any time I edit an article and hit save:
      Code:
      Invalid SQL:
      
      			SELECT thread.threadid
      			FROM thread AS thread
      			LEFT JOIN vault_link AS link ON (thread.firstpostid = link.postid)
      			WHERE thread.threadid IN (115176)
      				AND link.redirect = 1
      				AND link.targetid IN ()
      			GROUP BY thread.threadid;
      
      MySQL 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 ')
      			GROUP BY thread.threadid' at line 6
      If I return to the article and hit refresh the article does reflect the changes though.

      Edit: Just to clarify the code now reads:
      Code:
              if (
                      $vbulletin->options['vault_autolinks'] AND $linkid AND
                      (
                              $threadinfo['namespaceid'] == $nsid OR
                              (
                                      !$foruminfo['vault_type'] AND
                                      $nsid == $vbulletin->options['ces_default_forumid']
                              )
                      )
      Reply Reply  
    7. April 23, 2009 7:40 PM
      Entriple Entriple is offline
      New Member
      I disabled autolinks and the SQL error disapeared. The articles in question have no links on them, rather just random text which shouldn't result in any auto links being possible.

      I downloaded the latest zip, unpacked, scp'd it over, changed the version number, installed with overwrite, and then tried it again with autolink turned off and the redirect problem still seems to show up.
      Reply Reply  
    8. April 23, 2009 7:54 PM
      Entriple Entriple is offline
      New Member
      Somewhat found it, not sure how it's populated at this point.

      Code:
      var_dump($articles_to_skip);
      
              if (
                      !empty($linkids) AND
                      !empty($articles_to_skip) AND
                      VAULT == 'true' AND
                      empty($redirects_to_skip[$post['threadid']])
              )
              {
      var_dump($articles_to_skip);
      exit;
      Produces
      Code:
      array(1) {
        [115176]=>
        string(6) "115176"
      }
      array(1) {
        [115176]=>
        string(6) "115176"
      }
      array(1) {
        [""]=>
        NULL
      }
      array(1) {
        [""]=>
        NULL
      }
      So for some reason $articles_to_skip is being populated at some point with a broken value. of "" => null.
      Reply Reply  
    9. April 23, 2009 8:02 PM
      Entriple Entriple is offline
      New Member
      Strange, handle_bbcode_wiki_main is never being called, therefore I'm not sure how the array is being populated.

      Edit: Here we go, special_bbcode_parse_start() is where it's being screwed up and being given a null value.
      Reply Reply  
    10. April 23, 2009 8:05 PM
      pegasus pegasus is offline
      VaultWiki Team
      It's very likely that the $threadinfo['threadid'] value is NULLed somewhere if you are having the redirect issue. In that case, I probably cannot reproduce this because I can no longer reproduce the redirect problems. I have PMed you about this.

      In the mean time, in vault/special_plugins_bbcode.php, find:
      PHP Code:
      // bug fix #161 
      Select the entire if-else conditional starting on the next line. Replace it with this:
      PHP Code:
      if ($threadinfo['threadid'] == 'error' OR !isset($vault->parser['autolink_articles_to_skip']))
      {
          
      $vault->parser['autolink_articles_to_skip'] = array();
      }

      if (
      $threadinfo['threadid'] != 'error' AND !empty($threadinfo['threadid']))
      {
          
      $vault->parser['autolink_articles_to_skip'] = array(
              
      $threadinfo['threadid'] => $threadinfo['threadid']
          );
      } 
      Reply Reply  
    11. April 23, 2009 8:11 PM
      Entriple Entriple is offline
      New Member
      I made the following change and stopped receiving that particular error:
      Code:
                              // bug fix #161 - part 2 of 3
                              if ($threadinfo['threadid'] == 'error' || !$threadinfo['threadid'])
      But with autolinks enabled I'm still getting the redirect issue.

      Edit: missed your other post, trying it now.
      Reply Reply  
    12. April 23, 2009 8:17 PM
      Entriple Entriple is offline
      New Member
      Thanks, that fixed the SQL error. However the redirect issue is still persisting for some reason now.
      Reply Reply  
    13. April 23, 2009 8:32 PM
      Entriple Entriple is offline
      New Member
      I downloaded the files again, scp'd them up, changed the version number, imported the xml with overwrite, rebuilt the namespaces and tested it again. All seems to be working as expected now thanks! I also noticed what I presume is a typo over on Help:Tempate, the example shows {name|default} which doesn't work. I noticed in another bug report it showed {{{name|default}}} which does work. I'm presuming the help article just hasn't been updated since then.
      Reply Reply  
    14. April 23, 2009 8:39 PM
      pegasus pegasus is offline
      VaultWiki Team
      Odd, well great news that it's working now.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 11:06 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.