• 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 RC 2] Admin cp: Content types SQL error when updating active selections without changing the enabled/disabled state of any content type

    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 RC 2] Admin cp: Content types SQL error when updating active selections without changing the enabled/disabled state of any content type

    • Issue Tools
      • View Changes
    1. issueid=6017 April 10, 2020 12:30 AM
      ACL ACL is offline
      Regular Member
      [4.1 RC 2] Admin cp: Content types SQL error when updating active selections without changing the enabled/disabled state of any content type

      On the Content types page of the admin cp, an SQL statement prepare error is encountered when an administrator attempts to submit the form without first changing which types are active/not active. The error:
      Code:
      XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'END WHERE `id` IN () LIMIT 0' at line 3
      
      UPDATE  `vw_nodetype` SET `on` =  CASE `id` 
      		
      	 END  WHERE  `id` IN ()  LIMIT 0
      Stack trace:
      Code:
      #0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1064, '42000')
      #1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1064, '42000')
      #2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
      #3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
      #4 src/addons/vw/vw/_core/controller/db/xf2.php(117): XF\Db\AbstractAdapter->query('UPDATE  `vw_nod...')
      #5 src/addons/vw/vw/_core/model/db/mysql/vw.php(1339): vw_DB_Controller_XF2->query_write('UPDATE  `vw_nod...')
      #6 src/addons/vw/vw/_core/model/db/mysql/vw.php(983): vw_DB_MySQL_Model->shutdown_or_run('UPDATE  `vw_nod...', false)
      #7 src/addons/vw/vw/_core/controller/cp/types/vw.php(138): vw_DB_MySQL_Model->update(Array)
      #8 src/addons/vw/vw/_core/controller/cp/types/vw.php(29): vw_CP_Types_Controller->update()
      #9 src/addons/vw/vw/Admin/Controller/Wiki.php(103): vw_CP_Types_Controller->execute('update', 'post')
      #10 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Admin\Controller\Wiki->_actionIndex(Object(XF\Mvc\ParameterBag))
      #11 src/addons/vw/vw/Admin/Controller/Wiki.php(51): vw\vw\Mvc\Dispatcher::dispatch(Object(vw\vw\Admin\Controller\Wiki), 'index', Object(XF\Mvc\ParameterBag))
      #12 src/XF/Mvc/Dispatcher.php(350): vw\vw\Admin\Controller\Wiki->actionIndex(Object(XF\Mvc\ParameterBag))
      #13 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('vw\\vw\\Admin\\Con...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
      #14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
      #15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #16 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
      #17 src/XF.php(391): XF\App->run()
      #18 admin.php(13): XF::runApp('XF\\Admin\\App')
      #19 {main}
      ----

      Additionally, a little more could perhaps be done to visually distinguish enabled and disabled types from each other. As it stands, the only difference is the checked/unchecked checkbox state on the right-hand side. With XenForo 2.x, disabled template modifications change to grey text by adding the class .dataList-row--disabled to the applicable data row. One catch is this grey styling only specifically applies to links (via selector .dataList-row.dataList-row--disabled .dataList-cell--link a), so some extra CSS would, I believe, be necessary. Maybe something like the following could be added via a VaultWiki admin cp .less template:
      Code:
      .dataList-row.dataList-row--disabled .dataList-cell--main .dataList-mainRow
      {
      	color: @xf-textColorMuted;
      	.m-transition();
      }
    Issue Details
    Issue Number 6017
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Admin Panel
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.1.0 RC 2
    Fixed Version (none)
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 10, 2020 12:35 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed the database error in the next build.

      Applied disabled-row styling in the next release.
      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 6:11 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.