Jump to content

Module producing ccrazy error in admin when logged in not as superuser

Recommended Posts

I have reduced the module to this and the same error persists:


class PortalDashboard extends Process implements Module {

	public static function getModuleInfo() {
		return array(
			'title' => "Portal Dashboard",
			'version' => "0.1",
			//'permission' => array("page-lister"),
			'autoload' => false,
			'singular' => true,
			'permanent' => false,
			'requires' => array("PHP>=5.4.0", "ProcessWire>=3.0", "CatCoCustoms"),

	public function init() {}

In the red:


User Error
Exception: Unknown Selector operator: '' -- was your selector value properly escaped? field='Array', value='', selector: 'Array, parent_id=31, templates_id=5' (in /Applications/AMPPS/www/caco/wire/core/Selectors.php line 357)

#0 /Applications/AMPPS/www/caco/wire/core/Selectors.php(401): ProcessWire\Selectors->create('Array', '', '')
#1 /Applications/AMPPS/www/caco/wire/core/Selectors.php(158): ProcessWire\Selectors->extractString('Array, parent_i...')
#2 /Applications/AMPPS/www/caco/wire/core/Selectors.php(144): ProcessWire\Selectors->setSelectorString('Array, parent_i...')
#3 /Applications/AMPPS/www/caco/wire/core/PagesLoader.php(188): ProcessWire\Selectors->init('Array, parent_i...')
#4 /Applications/AMPPS/www/caco/wire/core/Pages.php(225): ProcessWire\PagesLoader->find('Array, parent_i...', Array)
#5 [internal function]: ProcessWire\Pages->___find('Array, parent_i...', Array)
#6 /Applications/AMPPS/www/caco/wire/core/Wire.php(374): call_user_func_array(Array, Array)
#7 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___find', Array)
#8 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pages), 'find', Array)
#9 /Applications/AMPPS/www/caco/wire/core/PagesLoader.php(370): ProcessWire\Wire->__call('find', Array)
#10 /Applications/AMPPS/www/caco/wire/core/PagesLoader.php(370): ProcessWire\Pages->find('Array, parent_i...', Array)
#11 /Applications/AMPPS/www/caco/wire/core/Pages.php(321): ProcessWire\PagesLoader->get('Array, parent_i...')
#12 /Applications/AMPPS/www/caco/wire/core/PagesType.php(310): ProcessWire\Pages->get('Array, parent_i...', Array)
#13 /Applications/AMPPS/www/caco/wire/core/User.php(223): ProcessWire\PagesType->get(Array)
#14 /Applications/AMPPS/www/caco/wire/core/User.php(166): ProcessWire\User->___hasPagePermission(Array, NULL)
#15 /Applications/AMPPS/www/caco/wire/core/Modules.php(1289): ProcessWire\User->hasPermission(Array)
#16 /Applications/AMPPS/www/caco/wire/modules/PagePermissions.module(547): ProcessWire\Modules->hasPermission('CcPortalDashboa...', Object(ProcessWire\User), Object(ProcessWire\Page), true)
#17 /Applications/AMPPS/www/caco/wire/modules/PagePermissions.module(512): ProcessWire\PagePermissions->processViewable(Object(ProcessWire\Page))
#18 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(629): ProcessWire\PagePermissions->viewable(Object(ProcessWire\HookEvent))
#19 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'viewable', Array)
#20 /Applications/AMPPS/www/caco/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php(432): ProcessWire\Wire->__call('viewable', Array)
#21 /Applications/AMPPS/www/caco/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php(432): ProcessWire\Page->viewable()
#22 /Applications/AMPPS/www/caco/wire/modules/AdminTheme/AdminThemeDefault/default.php(86): ProcessWire\AdminThemeDefaultHelpers->renderTopNavItems()
#23 /Applications/AMPPS/www/caco/wire/core/admin.php(174): require('/Applications/A...')
#24 /Applications/AMPPS/www/caco/wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/Applications/A...')
#25 /Applications/AMPPS/www/caco/site/templates/admin.php(19): require('/Applications/A...')
#26 /Applications/AMPPS/www/caco/wire/core/TemplateFile.php(268): require('/Applications/A...')
#27 [internal function]: ProcessWire\TemplateFile->___render()
#28 /Applications/AMPPS/www/caco/wire/core/Wire.php(374): call_user_func_array(Array, Array)
#29 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___render', Array)
#30 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array)
#31 /Applications/AMPPS/www/caco/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array)
#32 /Applications/AMPPS/www/caco/wire/modules/PageRender.module(514): ProcessWire\TemplateFile->render()
#33 [internal function]: ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent))
#34 /Applications/AMPPS/www/caco/wire/core/Wire.php(374): call_user_func_array(Array, Array)
#35 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___renderPage', Array)
#36 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array)
#37 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(629): ProcessWire\Wire->__call('renderPage', Array)
#38 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(629): ProcessWire\PageRender->renderPage(Object(ProcessWire\HookEvent))
#39 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array)
#40 /Applications/AMPPS/www/caco/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Wire->__call('render', Array)
#41 /Applications/AMPPS/www/caco/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Page->render()
#42 [internal function]: ProcessWire\ProcessPageView->___execute(true)
#43 /Applications/AMPPS/www/caco/wire/core/Wire.php(374): call_user_func_array(Array, Array)
#44 /Applications/AMPPS/www/caco/wire/core/WireHooks.php(549): ProcessWire\Wire->_callMethod('___execute', Array)
#45 /Applications/AMPPS/www/caco/wire/core/Wire.php(399): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'execute', Array)
#46 /Applications/AMPPS/www/caco/index.php(55): ProcessWire\Wire->__call('execute', Array)
#47 /Applications/AMPPS/www/caco/index.php(55): ProcessWire\ProcessPageView->execute(true)
#48 {main} search►



Source file

File: /Applications/AMPPS/www/caco/index.php:64

54:        $wire->wire('process', $process);
55:        echo $process->execute($config->internal);
56:        $config->internal ? $process->finished() : extract($wire->wire('all')->getArray());
58:    } catch(\Exception $e) {
59:        // Formulate error message and send to the error handler
60:        if($process) $process->failed($e);
61:        $wire ? $wire->trackException($e) : $config->trackException($e);
62:        $errorMessage = "Exception: " . $e->getMessage() . " (in " . $e->getFile() . " line " . $e->getLine() . ")";
63:        if($config->debug || ($wire && $wire->user && $wire->user->isSuperuser())) $errorMessage .= "\n\n" . $e->getTraceAsString();
64:        trigger_error($errorMessage, E_USER_ERROR);
65:    }

Call stack
HTTP request
HTTP response

    Report generated at 2017/09/03 22:18:50
    PHP 5.6.21
    Apache/2.4.20 (Unix) PHP/5.6.21 mod_wsgi/3.5 Python/3.5.1 OpenSSL/1.0.1p
    Tracy 2.4.2

When I uninstall the aforementioned module this doesn't happen, oddly enough. What could be the problem?

Share this post

Link to post
Share on other sites

Hello @hellomoto,

the module info you provided doesn't produce this error on my installation. I have created a new module file and get only the warning about the missing dependency CatCoCustoms. What is CatCoCustoms? I couldn't find a module with this class name. Or is it a library?

Also you should add the ProcessWire namespace on top of your file as a best practice. ;)

Regards, Andreas

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Pip
      Hi everyone!
      I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. 
      Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. 
      Thing is I'd like to grant my new users the power to create their own pages. Any advice? 
    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
    • By vwatson
      I don't have any fontawesome icons in the admin section. Not sure what's wrong. They used to appear. I've tried all the user profiles and they're gone in all of them.
      Using the browser inspector tool, I see this message:
      Access to font at 'https://www.domain.com/wire/templates-admin/styles/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0' from origin 'http://domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
      I'm not sure why this is occurring or how to fix it. Any help would be greatly appreciated. 
    • By snck
      I want my editors to be able to use the page lister, especially the bookmarks. I added the page-lister permission to the editor role, but Page lister ("Find" menu item) does not show. Is there anything else I have to do? Links to bookmarks work for the editors, but I would be glad to show them the menu item as well.
      Maybe this has something to do with the long history of the site (started with ProcessWire 2.4 and upgraded to 3.0.148 over the years)?
    • By Andi
      Getting a little deeper into the ProcessWire state-of-mind here. I seriously think I wouldn't have come back to webdev if it wasn't for this wonderful little gem of a CMS.
      I have an "Options" field added to all users on a site. If the user has anything other then "default" selected, I would like to show a permanent message in the admin like the one in the screenshot, only so that the user can't close it. As a friendly reminder that he changed that option from default to something crazy 🙂
      I've read up on how to send messages to users, but where would I hook into to make this show up all the time in the backend?
      Thanks in advance!

  • Create New...