Jump to content


Photo

Cant create Roles

error role roles preg_match

  • Please log in to reply
1 reply to this topic

#1 ignisis

ignisis

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 February 2018 - 07:01 AM

When I try to create a new role in X2CRM I get the following error log.

 

Error Code: 500
Error Message: preg_match(): Compilation failed: regular expression is too large at offset 36482
Stack Trace: [click to toggle display]

PHP warning in /var/www/html/X2CRM-master/x2engine/framework/validators/CRegularExpressionValidator.php(55)
#0 /var/www/html/X2CRM-master/x2engine/framework/validators/CRegularExpressionValidator.php(55): preg_match()
#1 /var/www/html/X2CRM-master/x2engine/framework/validators/CValidator.php(201): CRegularExpressionValidator->validateAttribute()
#2 /var/www/html/X2CRM-master/x2engine/framework/base/CModel.php(159): CRegularExpressionValidator->validate()
#3 /var/www/html/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(808): Roles->validate()
#4 /var/www/html/X2CRM-master/x2engine/protected/controllers/AdminController.php(2381): Roles->save()
#5 /var/www/html/X2CRM-master/x2engine/framework/web/actions/CInlineAction.php(49): AdminController->actionManageRoles()
#6 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(308): CInlineAction->runWithParams()
#7 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(133): AdminController->runAction()
#8 /var/www/html/X2CRM-master/x2engine/protected/controllers/AdminController.php(730): CFilterChain->run()
#9 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): AdminController->filterClearCache()
#10 /var/www/html/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()
#11 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(291): CFilterChain->run()
#12 /var/www/html/X2CRM-master/x2engine/framework/web/CController.php(265): AdminController->runActionWithFilters()
#13 /var/www/html/X2CRM-master/x2engine/framework/web/CWebApplication.php(282): AdminController->run()
#14 /var/www/html/X2CRM-master/x2engine/framework/web/CWebApplication.php(141): X2WebApplication->runController()
#15 /var/www/html/X2CRM-master/x2engine/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#16 /var/www/html/X2CRM-master/x2engine/index.php(64): X2WebApplication->run()

X2Engine Version: 6.9.3
PHP Version: 5.4.16

 

Any work around to get this working?

the only thing I can find online is to recompile PHP.



#2 ignisis

ignisis

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 20 February 2018 - 01:49 PM

I found that commenting out the if statement in framework/validators/CRegularExpressionValidator.php and changing it to "if(false)" allows the role to be completed but with a limited number of fields.

As a work around, now I should be able to figure out a mysql script to manually edit the various roles tables.

We have about 1200 fields that its trying to set permissions for. It seems the interface could be modified to set each modules fields separately rather than all at once. This way X2 won't crash for larger implementations.

Hopefully in the future there is a better interface to manage roles.







Also tagged with one or more of these keywords: error, role, roles, preg_match

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users