• 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
    • In posts with table tags the text editor in VW won't work when trying to edit pages

    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: In posts with table tags the text editor in VW won't work when trying to edit pages

    • Issue Tools
      • View Changes
    1. issueid=6299 April 2, 2022 4:11 PM
      FrankPereiro FrankPereiro is offline
      Junior Member
      In posts with table tags the text editor in VW won't work when trying to edit pages
      In posts with table tags the text editor in VW won't work when trying to edit pages

      Hi there,

      I'm creating some pages where I'm inserting some table tags to show some data. Everytime I'm trying to edit those pages the text editor won't work. This doesn't happen in other pages where I don't use table tags, just where I'm using table tags, and I can't find a solution for this.

      Maybe VW has some table tags of it own which I can use instead.

      Thanks in advanced...

    Issue Details
    Issue Number 6299
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Text Editor (WYSIWYG, etc)
    Status Cannot Reproduce
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.1.4
    Fixed Version (none)
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags bb-code, bug, editor, Table




    1. April 3, 2022 5:04 AM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Hi there,

      Something funny is going on with the text editor in Xenforo (latest version).

      As I said, in pages with tables (with data) is not working when editing and something similar is happening with the templates with or without table tags.

      I hope that someone knows how to solve this because is a little annoying.

      Thanks
      Reply Reply  
    2. April 3, 2022 5:52 AM
      FrankPereiro FrankPereiro is offline
      Junior Member
      After further testing, the text editor in Xenforo works like this:

      • If I uncheck "Template, so it can be used as a building block for other pages" then the text editor becomes available
      • After editing the template and after checking the box again for the template, the changes remain


      The changes remain but it looks like this before saving it, just when I check again the box for it to be a template:



      After I saved the template, this is how it looks:



      Now, where I want the template to be shown, it looks like this:



      The result is just like it should be...
      Reply Reply  
    3. April 3, 2022 7:41 AM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Hi there,

      I'm still doing some tests with the templates and I found that if I want to insert an image to it I get the following errors:

      TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in src/addons/vw/vw/XF/BbCode/Parser.php at line 266
      strpos() in src/addons/vw/vw/XF/BbCode/Parser.php at line 266
      vw\vw\XF\BbCode\Parser->openTag() in src/addons/vw/vw/XF/BbCode/Parser.php at line 128
      vw\vw\XF\BbCode\Parser->vwCaptureTag() in src/addons/vw/vw/XF/BbCode/Parser.php at line 58
      vw\vw\XF\BbCode\Parser->parse() in src/XF/BbCode/Traverser.php at line 21
      XF\BbCode\Traverser->render() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 149
      vw\vw\XF\BbCode\Renderer\Html->vwParentRender() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 85
      vw\vw\XF\BbCode\Renderer\Html->vwRender() in src/addons/vw/vw/_core/model/parser/sideways/template/xf2.php at line 61
      vw_Parser_Sideways_Template_Model_XF2->processBbCode() in src/addons/vw/vw/_core/model/parser/sideways/template/xf0.php at line 551
      vw_Parser_Sideways_Template_Model_XF0->process_replacements() in src/addons/vw/vw/_core/model/parser/sideways/template/xf2.php at line 72
      vw_Parser_Sideways_Template_Model_XF2->process_replacements() in src/addons/vw/vw/_core/model/parser/handle/base/vw.php at line 172
      vw_Parser_Handle_Base_Model->handle_bbcode_template() in src/addons/vw/vw/_core/model/parser/handle/wrapper/vw.php at line 213
      vw_Parser_Handle_Wrapper_Model->vwcode_wrapper() in src/XF/BbCode/Renderer/Html.php at line 310
      XF\BbCode\Renderer\Html->renderTag() in src/addons/s9e/MediaSites/XF/BbCode/Renderer/Html.php at line 14
      s9e\MediaSites\XF\BbCode\Renderer\Html->renderTag() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 523
      vw\vw\XF\BbCode\Renderer\Html->renderTag() in src/XF/BbCode/Traverser.php at line 63
      XF\BbCode\Traverser->renderSubTree() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 553
      vw\vw\XF\BbCode\Renderer\Html->renderSubTree() in src/XF/BbCode/Traverser.php at line 39
      XF\BbCode\Traverser->renderAst() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 154
      vw\vw\XF\BbCode\Renderer\Html->renderAst() in src/XF/BbCode/Traverser.php at line 22
      XF\BbCode\Traverser->render() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 149
      vw\vw\XF\BbCode\Renderer\Html->vwParentRender() in src/addons/vw/vw/XF/BbCode/Renderer/Html.php at line 85
      vw\vw\XF\BbCode\Renderer\Html->vwRender() in src/addons/vw/vw/_core/instance/parser/renderer/xf2.php at line 385
      vw_Parser_Renderer_Instance_XF2->render() in src/addons/vw/vw/_core/model/parser/instance/xf2.php at line 219
      vw_Parser_Instance_Model_XF2->parse() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 1370
      vw_DM_Page_Controller->process_links() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 951
      vw_DM_Page_Controller->process_revision() in src/addons/vw/vw/_core/controller/dm/page/vw.php at line 803
      vw_DM_Page_Controller->pre_save() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 513
      vw\vw\XF\Entity\EntityBase->_preSave() in src/XF/Mvc/Entity/Entity.php at line 1359
      XF\Mvc\Entity\Entity->preSave() in src/addons/vw/vw/XF/Entity/EntityBase.php at line 504
      vw\vw\XF\Entity\EntityBase->vwPreSave() in src/addons/vw/vw/_core/controller/dm/xf2.php at line 367
      vw_DM_Controller_XF2->pre_save() in src/addons/vw/vw/_core/controller/ui/edit/page/vw.php at line 601
      vw_UI_Edit_Page_Controller->start_dm() in src/addons/vw/vw/_core/controller/ui/edit/vw.php at line 172
      vw_UI_Edit_Controller->save() in src/addons/vw/vw/_core/controller/ui/create/vw.php at line 445
      vw_UI_Create_Controller->publish() in src/addons/vw/vw/_core/controller/ui/index/vw.php at line 73
      vw_UI_Index_Controller->publish() in src/addons/vw/vw/_core/controller/ui/index/vw.php at line 33
      vw_UI_Index_Controller->execute() in src/addons/vw/vw/_core/controller/ui/stack/vw.php at line 295
      vw_UI_Stack_Controller->execute() in src/addons/vw/vw/Pub/Controller/Wiki/Wiki.php at line 80
      vw\vw\Pub\Controller\Wiki\Wiki->_actionIndex() in src/addons/vw/vw/Mvc/Dispatcher.php at line 30
      vw\vw\Mvc\Dispatcher::dispatch() in src/addons/vw/vw/Pub/Controller/Wiki/AbstractController.php at line 26
      vw\vw\Pub\Controller\Wiki\AbstractController->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2351
      XF\App->run() in src/XF.php at line 517
      XF::runApp() in index.php at line 20

      If I take away the image then it renders the template with no issues...
      Reply Reply  
    4. April 3, 2022 12:42 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thank you for the additional information. Does this mean that the table tags work fine as long as the tag is not being used inside a template editor? Or is it both regular editors with table tags and also template editors that look like that?

      My editor always has buttons, even if it is a template editor, but most buttons are grayed out in template mode. Your screen shot suggests that the buttons don't even load. Are you using another add-on that makes changes to the editor?

      For that error message with image tags, I believe that may happen if the wiki page contains some tags with XenForo's "advanced"-style options (the only one I know of is URL unfurl="true"

      In src/addons/vw/vw/XF/BbCode/Parser.php, find:
      Code:
      if (!empty($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      Replace with:
      Code:
      if (!empty($currentTag['option']) AND is_string($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      Reply Reply  
    5. April 4, 2022 12:38 PM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Quote Originally Posted by pegasus
      Thank you for the additional information. Does this mean that the table tags work fine as long as the tag is not being used inside a template editor? Or is it both regular editors with table tags and also template editors that look like that?

      My editor always has buttons, even if it is a template editor, but most buttons are grayed out in template mode. Your screen shot suggests that the buttons don't even load. Are you using another add-on that makes changes to the editor?

      For that error message with image tags, I believe that may happen if the wiki page contains some tags with XenForo's "advanced"-style options (the only one I know of is URL unfurl="true"

      In src/addons/vw/vw/XF/BbCode/Parser.php, find:
      Code:
      if (!empty($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      Replace with:
      Code:
      if (!empty($currentTag['option']) AND is_string($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      Hi there,

      I was talking about a regular page, not a template.

      The buttons in the page, where the table tags are, the buttons are grayed out, like in the image below:



      I'm going to try your solution, will let you know.

      Thanks
      Reply Reply  
    6. April 4, 2022 12:40 PM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Another shot, this time not in preview mode:

      The table tags are in one line:

      Reply Reply  
    7. April 4, 2022 12:56 PM
      FrankPereiro FrankPereiro is offline
      Junior Member
      Quote Originally Posted by pegasus
      Thank you for the additional information. Does this mean that the table tags work fine as long as the tag is not being used inside a template editor? Or is it both regular editors with table tags and also template editors that look like that?

      My editor always has buttons, even if it is a template editor, but most buttons are grayed out in template mode. Your screen shot suggests that the buttons don't even load. Are you using another add-on that makes changes to the editor?

      For that error message with image tags, I believe that may happen if the wiki page contains some tags with XenForo's "advanced"-style options (the only one I know of is URL unfurl="true"

      In src/addons/vw/vw/XF/BbCode/Parser.php, find:
      Code:
      if (!empty($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      Replace with:
      Code:
      if (!empty($currentTag['option']) AND is_string($currentTag['option']) AND $this->vwParser->hasState('vw-template') AND strpos($currentTag['option'], '[') !== false)
      The problem is still intact...

      I went to check a regular post in the forum with a table and the text editor is working fine.
      Reply Reply  
    8. April 4, 2022 2:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      In templates, the buttons are grayed out intentionally, mainly because the XenForo editor cannot handle raw template parameters without damaging them.
      I was talking about a regular page, not a template.

      The buttons in the page, where the table tags are, the buttons are grayed out
      - Do the settings for the wiki area containing this page permit parsing HTML in wiki pages?

      In regular wiki pages with HTML turned on, the buttons will also be grayed out intentionally, because the XenForo editor cannot handle raw HTML without damaging it. It is better to have the buttons turned off than to lose parts of your message without warning. If you do not need to use raw HTML, you should disable that setting. I recommend only using raw HTML inside some templates.

      The problem is still intact...
      The solution I posted was only for the error message you gave about IMG tags. For TABLE tags, I am still trying to understand what you are seeing.

      For reference, I have a test page with XenForo tables in the XenForo 2.x demo here:
      https://www.vaultwiki.org/xf-wiki/in...ock-TABLE-Test
      But when I click Edit, most buttons are not grayed out. You can see smilies and images grayed out, but that is because I disabled them in my area settings.
      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 8:27 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 © 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.