• 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 4.x Series
    • Bug
    • Lists sometimes get modified when saving

    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: Lists sometimes get modified when saving

    • Issue Tools
      • View Changes
    1. issueid=4063 November 3, 2014 3:33 PM
      owls8521 owls8521 is offline
      New Member
      Lists sometimes get modified when saving

      Sometimes, when you save a page that has a list on it, every list item will become its own list. This results in a lot of manual labor to fix it if you have a lot of lists on a page.

      Essentially, this:
      Code:
      [LIST][*]Item 1[*]Item 2[*]Item 3[*]Item 4[*]Item 5[/LIST]
      Will become this:
      Code:
      [LIST][*]Item 1[/LIST]
      [LIST][*]Item 2[/LIST]
      [LIST][*]Item 3[/LIST]
      [LIST][*]Item 4[/LIST]
      [LIST][*]Item 5[/LIST]
    Issue Details
    Issue Number 4063
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.0 RC 4
    Fixed Version 4.0.0 RC 5
    Milestone VaultWiki 4.0 Gold
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 3, 2014 3:43 PM
      owls8521 owls8521 is offline
      New Member
      I just realized it happens if you preview a page with a list on it and then save after previewing.
      Reply Reply  
    2. November 4, 2014 10:56 AM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed in the next release. This is in part due to the highly popular method of using preg_replace in order to handle WYSIWYG parsing as a string, rather than the less error-prone method of creating a DOM tree and adding/removing nodes. Proper DOM tree handling would be able to track current open tags and fake markup that has already been added, rather than trying to guess using string patterns. However, XenForo is designed with preg_replace and it works fine enough in regular posts that it wouldn't care to make this design change.

      This creates a conflict because VaultWiki defers line-break conversion until after all other BB-Codes have been parsed (to account for templates, etc), which screws up the expected output for the step of the WYSIWYG parser that strips fake markup. However, not only is this consideration not necessary in WYSIWYG (nested templates would never be parsed in WYSIWYG mode), but this practice is error-prone already as it breaks at least the PHP tag that I have seen. Further, deferment should not be necessary since VaultWiki uses fake tags to embed parser states for the compile step, so it can do the same to suppress later line-break conversion if it was already performed.

      The change is already applied on your site. Please let me know if you notice any unexpected side effects in other parsed code.
      Reply Reply  
    3. November 4, 2014 11:32 AM
      owls8521 owls8521 is offline
      New Member
      There are still two problems with this.

      1. Lists are still previewed incorrectly, as if they are not lists. Only line breaks are shown.
      2. When I save the page, there is an extra list item added to the top of the list. The weird thing is, when I go to edit the page afterward, the bb code is correct. So somehow the page is getting saved incorrectly, but the bb code itself is not changing.

      I tested with this page. It still shows the extra list item at the top of each list.
      Reply Reply  
    4. This petition for a change to Confirmed was accepted
      November 4, 2014 11:59 AM
      owls8521 owls8521 is offline
      New Member
      This page got really messed up after I saved it. But once again, the source code looks fine.
       
    5. November 4, 2014 1:21 PM
      pegasus pegasus is offline
      VaultWiki Team
      #1 is a styling/CSS issue on the preview page. I may not be able to fix this completely without modifying the style templates.

      #2 looks like an issue in the BB-Code parser. I have rewritten a huge chunk of the parser to try to handle this. Since it's a pretty massive rewrite, I no doubt broke things (especially things in templates). First clear the page cache in the Admin Panel under Integrity > Counters. Then I would suggest checking that pages containing templates still work as expected, and that you can't break any of the rules implemented by either template area's or the page's area's Parsing Options.
      Reply Reply  
    6. November 4, 2014 2:25 PM
      owls8521 owls8521 is offline
      New Member
      This page has a template, and it's not being rendered correctly. The html is showing directly instead of being parsed I think.

      Edit: The lists show correctly in the preview now.
      Reply Reply  
    7. November 4, 2014 5:06 PM
      pegasus pegasus is offline
      VaultWiki Team
      Content passed as template arguments should be parsed correctly again.
      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 10:22 AM.
    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.