[4.1 Beta 2] Disallowed titles: Cannot add new title (empty value warning), "Re-Allow Selected Titles" button unnecessary when no titles exist
1) Cannot add new disallowed titles with a prefix of "-- Any --". The following error is displayed in the browser console:
Code:
POST admin.php?wiki/protect/ 500 (Internal Server Error)
An error is also written to the server error log:
ErrorException: [E_WARNING] Creating default object from empty value src/addons/vw/vw/_core/controller/cp/protect/vw.php:178
Code:
#0 src/addons/vw/vw/_core/controller/cp/protect/vw.php(178): XF::handlePhpError(2, '[E_WARNING] Cre...', '/path/to/vaultw...', 178, Array)
#1 src/addons/vw/vw/_core/controller/cp/protect/vw.php(54): vw_CP_Protect_Controller->save()
#2 src/addons/vw/vw/Admin/Controller/Wiki.php(90): vw_CP_Protect_Controller->execute('save', 'post')
#3 src/addons/vw/vw/Mvc/Dispatcher.php(30): vw\vw\Admin\Controller\Wiki->_actionIndex(Object(XF\Mvc\ParameterBag))
#4 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))
#5 src/XF/Mvc/Dispatcher.php(321): vw\vw\Admin\Controller\Wiki->actionIndex(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('vw\\vw\\Admin\\Con...', 'Index', Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
#7 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\Admin\Controller\Wiki), NULL)
#8 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#10 src/XF.php(390): XF\App->run()
#11 admin.php(13): XF::runApp('XF\\Admin\\App')
#12 {main}
I run into the same error when attempting to remove an existing disallowed title (title with prefix).
------
2) Also, the
vw_protect_desc phrase makes one reference to 'Protected', and could be updated to 'Disallowed'. Change made in bold:
"This is effectively a list of Titles that are not allowed across the wiki. Existing content will not be affected by this list unless its Title is changed. Once a Title is
Disallowed, users cannot create any new content with that as its Title."
------
3) Priority 5 minor bug/tweak: "Re-Allow Selected Titles" button appears at admin.php?wiki/protect/ even when there are 0 existing disallowed titles.
4) Priority 7 minor enhancement: "Disallow New Title" button would be better moved to the page action location (next to title), the same as "Add area" (Area manager) and "Add prefix" (Prefix manger).
An edited screenshot will be attached for reference shortly.
5) Priority 5 minor bug/tweak: The styling for the existing disallowed titles checkbox list is a bit funky with a bullet point shown for each title.