• 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
    • [4.1 Beta 3] Embedded template contains unparsed bbcode in build 002 (after upgrading from build 001)

    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: [4.1 Beta 3] Embedded template contains unparsed bbcode in build 002 (after upgrading from build 001)

    • Issue Tools
      • View Changes
    1. issueid=5844 September 6, 2019 4:10 PM
      ACL ACL is offline
      Regular Member
      [4.1 Beta 3] Embedded template contains unparsed bbcode in build 002 (after upgrading from build 001)

      After upgrading my offline test site from VW 4.1 Beta 3 b001 to Beta 3 b002, templates when embedded into other pages (with [template] bbcode) have stopped parsing bbcode that is contained within the template content. BBcode continues to parse correctly when written directly on a non-template page.

      For example, if I created a template with the following bbcode...
      Code:
      [B]Hi[/B], testing the [COLOR="#0000FF"]bbcode[/COLOR]!
      ...and then created a new regular page with the same bbcode followed by the embedded template, then the page will display as:
      Hi, testing the bbcode!
      [B]Hi[/B], testing the [COLOR="#0000FF"]bbcode[/COLOR]!
      Template parameters are rendered as unparsed bbcode, e.g. [n2m1zta5][/n2m1zta5].

      Rebuilding the VW addon or editing/resaving a custom bbcode does not fix the issue. Embedded templates ([template]) continue to show unparsed bbcode on other pages. If a template makes use of [includeonly] and [noinclude] bbcode, then all of the template is embedded (unparsed). Other VW bbcodes written on a normal page directly do parse, e.g. [H="2"]Heading text[/H] will correctly display a <h2> heading.

      I upgraded a different test site from 4.1 Beta 1 to Beta 3 b002 and this time embedded template contents is not affected (bbcode is parsed OK this time). Do you think it might be worth re-running the Beta 2 to Beta 3 upgrade script on the affected test site?

      This problem doesn't appear to affect the VW XF2.1 demo. If it did, then this page (between start template and end template text) would reveal unparsed headline bbcode. But all looks OK over there.
    Issue Details
    Issue Number 5844
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Templates
    Status Cannot Reproduce
    Priority 3 - Loss of Functionality
    Affected Version 4.1.0 Beta 3
    Fixed Version (none)
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 2
    Assigned Users (none)
    Tags (none)




    1. September 6, 2019 5:14 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please make sure that all test sites are using the same test data (page content and template content is exactly the same).

      It is possible this is an unwanted effect of the fix for https://www.vaultwiki.org/issues/5823/
      but I will need the appropriate test data to reproduce.

      The behavior you describe also sounds like the normal behavior if the template is saved in an area that does not parse BB-Codes. This area value is preserved when the template is rendered within another page.
      Reply Reply  
    2. September 7, 2019 11:41 AM
      ACL ACL is offline
      Regular Member
      Some more details: This unparsed bbcode issue is witnessed only on my primary offline test site, where Beta 3 b001 was upgraded to via an edited addon.json version_id prior to Beta 3 b002 availability. It affects existing templates and new templates. This issue is not present on a second offline test site that was upgraded from Beta 2 to Beta 3 b002 directly.

      I have created a template page with the title "Template:ParseBBCode", in an area that is configured to parse bbcode in the Area's parsing options. The template intentionally embeds its own contents via the use of INCLUDEONLY and NOINCLUDE as it means only the one page is necessary for testing. Its content:
      Code:
      [INCLUDEONLY][list][*] Test[/list][/INCLUDEONLY][NOINCLUDE][TEMPLATE]Template:ParseBBCode[/TEMPLATE][/NOINCLUDE]
      On my primary test site (running Beta 3 b002, previously Beta 3 b001) this is rendered as follows:
      [INCLUDEONLY][list][*] Test[/list][/INCLUDEONLY][NOINCLUDE][TEMPLATE]Template:ParseBBCode[/TEMPLATE][/NOINCLUDE]
      On my secondary test site (running Beta 3 b002, previously Beta 1 b002) this is rendered as follows:
      • Test
      On the VW.org XF demo this is rendered as follows:
      • Test
      As for the affected test site, these are some things I've tried:
      • In admin cp, edit any custom bbcode and save it
      • Check area configuration allows BBcode (it does)
      • Disable BBcode in area, save, Re-enable BBcode in area, save again
      • Rebuild VW addon
      • Disable, re-enable VW addon
      • Move a template to a different area
      • Disable Template content type, Re-enable again
        • While content type was disabled, the template icon is changed to vw-icon-page and the page content appears like so:
          [INCLUDEONLY]
          • Test
          [/INCLUDEONLY][NOINCLUDE][TEMPLATE]Template:ParseBBCode[/TEMPLATE][/NOINCLUDE]
      • Change area's allowed types from "Any Type" to Template, save, repeat in reverse


      Still on the affected test site, I tried creating another new template, this time with HTML (in an area that permits HTML). The template title is "Template:ParseHtml" and code:
      Code:
      [if="{{{header}}}"]<h5>{{{header|}}}</h5>[/if][if="{{{data}}}"]<p style="color:red">{{{data|}}}</p>[/if]
      The template was added to a standard page with the following template bbcode and parameters:
      Code:
      [template]Template:ParseHtml|header=test_heading|data=test_data[/template]
      And this is how the template appears when embedded into another page:
      [if="[nju1owm0]test_heading[/nju1owm0]"]

      test_heading

      [/if][if="[owywmgmw]test_data[/owywmgmw]"]

      test_data

      [/if]
      Reply Reply  
    3. September 7, 2019 3:18 PM
      pegasus pegasus is offline
      VaultWiki Team
      Edit the BB-Codes NOINCLUDE, INCLUDEONLY, IF, etc and check the Wiki-Related Options. Make sure the option to parse them in wiki content is turned on.
      Reply Reply  
    4. September 7, 2019 4:28 PM
      ACL ACL is offline
      Regular Member
      Thanks for the suggestion.

      I've checked TEMPLATE, IF, NOINCLUDE, INCLUDEONLY and ONLYINCLUDE. All have vw_options[wiki_parse] = true (checked). One bbcode at a time, I unchecked this setting, saved, rechecked it and saved again. Unfortunately, nothing has changed .

      On my test site that faces this issue, I have edited the template contents to place standard XF bbcode within INCLUDEONLY and NOINCLUDE plus also not in either of them. This does reveal that a bbcode seems to render inside NOINCLUDE . Observe the following template:
      Code:
      [INCLUDEONLY][b]YES[/b][/INCLUDEONLY][u]Maybe[/u][NOINCLUDE][b]No[/b][TEMPLATE]Template:ParseBBCode[/TEMPLATE][/NOINCLUDE]
      This produces:
      [u]Maybe[/u]No[INCLUDEONLY][b]YES[/b][/INCLUDEONLY][u]Maybe[/u][NOINCLUDE][b]No[/b][TEMPLATE]Template:ParseBBCode[/TEMPLATE][/NOINCLUDE]
      This is proving to be a mystery.

      Here's a screenshot as an alternative to the above close-ish text representation.

      Attachment 1692
      Reply Reply  
    5. September 7, 2019 5:36 PM
      pegasus pegasus is offline
      VaultWiki Team
      From the last several examples, the following behavior appears to be true, at least when viewing a template:
      - The behavior of unwrapped BB-Codes appears to be normal (unrendered).
      - The behavior of NOINCLUDE appears to be normal (renders).
      - Once inside an included template, encountering INCLUDEONLY causes all template contents starting with that first opening tag to be shown as unrendered.

      I am not sure how this would apply to the IF tag in your ParseHTML example.
      I am not sure how this would apply to the example in your first post.

      Still, I would expect the behavior to be consistent across all test sites. Please make sure that all sites have restarted PHP and loaded the offending page at least two times since restarting, in order to rule out a possible issue with outdated PHP opcode cache contents. Also be sure to clear the contents of the vw_parsed database table. So hopefully we can get a consistent behavior.
      Reply Reply  
    6. September 7, 2019 6:15 PM
      ACL ACL is offline
      Regular Member
      Quote Originally Posted by pegasus
      From the last several examples, the following behavior appears to be true, at least when viewing a template:
      - The behavior of unwrapped BB-Codes appears to be normal (unrendered).
      - The behavior of NOINCLUDE appears to be normal (renders).
      - Once inside an included template, encountering INCLUDEONLY causes all template contents starting with that first opening tag to be shown as unrendered.

      I am not sure how this would apply to the IF tag in your ParseHTML example.
      I am not sure how this would apply to the example in your first post.
      The later examples use the NOINCLUDE & INCLUDEONLY combination since the testing only requires the one page. Unparsed bbcode also occurs when a template is embedded into another page. Let me provide a simple example that doesn't use INCLUDEONLY.

      Template code:
      Code:
      [b]bold[/b]
      Output on a page:

      Attachment 1692

      Quote Originally Posted by pegasus
      Still, I would expect the behavior to be consistent across all test sites. Please make sure that all sites have restarted PHP and loaded the offending page at least two times since restarting, in order to rule out a possible issue with outdated PHP opcode cache contents. Also be sure to clear the contents of the vw_parsed database table. So hopefully we can get a consistent behavior.
      Yes, it is the inconsistencies between the test sites (both running off the same hardware) that is boggling. I'll play some more and try what you've suggested and report back later (probably not at least until tomorrow).
      Reply Reply  
    7. September 8, 2019 8:10 AM
      ACL ACL is offline
      Regular Member
      Good news! I think I've resolved this bbcode rendering issue.

      Something else that I've tried is deleting the TEMPLATE bbcode (with development mode enabled for this task) and re-creating it manually with the same values, e.g. vw_varname set to "vw_template_tag" and identical checked/unchecked wiki-related options. After doing this, BBcode is magically being parsed again in the places it is expected, i.e. template contents that are embedded into other pages.

      At one point, I had $config['development']['enabled'] set to true on the affected test site in order to check whether the vwpage content type had a bookmark_handler_class in Beta 3 b001 (related to fixed issue 5836). At the time of upgrading to Beta 3 b002, development mode might still have been enabled. For the other unaffected test site, development mode has always been disabled. I'm not sure that this should matter though.

      If I remember, I'll re-enable development mode the next time I upgrade VW on the test site and see if the bbcode parsing issue returns. If all is good, then I guess this was just a weird anomaly.

      Earlier, I did reboot the server and also emptied the vw_parsed table, but this didn't help.

      But for now, the issue looks resolved. Thanks for the suggestions.
      Reply Reply  
    8. September 9, 2019 7:11 AM
      pegasus pegasus is offline
      VaultWiki Team
      Since you had development mode active, possibly during an upgrade, check if there is a folder src/addons/vw/vw/_output.

      If it exists, remove it. Performing an upgrade while this folder exists may result in missing add-on data, since you only have partial _output contents. Since you modified content-types under development mode, then a number of content-type entries may now be missing. Once the _output folder is gone, rebuilding the add-on data should restore them.

      For now, marking this as Cannot Reproduce.
      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 12:33 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 © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.