6 users online. Create an account or sign in to join them.Users
Error: Delimiter must not be alphanumeric or backslash
This is an open discussion with 6 replies, filed under Troubleshooting.
Search
What's the debug backtrace of that error?
You could also do a find in your project for listDirStructure. I saw this recently and it was an extension calling listDirStructure with different parameters.
Hi Brendo,
Just updated to 2.2 and I am getting the same error as above. This also includes a call for listDirStructure in the backtrace as you mentioned. Backtrace pasted below.
The error occurs when I try to edit or create a new section... help would be appriciated, since i'm quite new to symphony and cannot figure out where I have to go to create some sort of fix.
Thanks
* [:0] GenericErrorHandler::handler(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibtoolkitclass.general.php:874] preg_match(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comextensionsuploadselectboxfieldfieldsfield.uploadselectbox.php:86] General::listDirStructure(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonycontentcontent.blueprintssections.php:373] FieldUploadselectbox->displaySettingsPanel(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibtoolkitclass.administrationpage.php:440] contentBlueprintsSections->__viewEdit(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibtoolkitclass.administrationpage.php:397] AdministrationPage->__switchboard(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibtoolkitclass.administrationpage.php:260] AdministrationPage->view(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibcoreclass.administration.php:221] AdministrationPage->build(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comsymphonylibcoreclass.administration.php:374] Administration->__buildPage(); * [C:Documents and SettingsDellMy Documentsxampphtdocsrtfx.comindex.php:25] Administration->display();
Problem resolved, had to change a parameter from true to null to only retrieve the directory in question.
Solved the issue in my case
Wow, I've tried everything, but finally I found the problem!
Thanks gunglien and brendo for your help!!
The problem was inside the uploadselectboxfield extension. There you have to go to fields/field.uploadselectbox.php and change on on line 86 the next code.
$directories = General::listDirStructure(WORKSPACE, true, 'asc', DOCROOT, $ignore);
with
$directories = General::listDirStructure(WORKSPACE, null, 'asc', DOCROOT, $ignore);
We're seeing this reported a lot. Can anyone point out what changed and when with the listDirStructure class? It looks like the core changed, and all extensions that are using it need to be updated.
listDirStructure changed into 2.2 fix some issues with the function:
- It has a lot of logic referring to
$filters, yet there was no$filtersparameter - The
$sortparameter was never used - The logic between
listDirStructureandlistStructureshould be similar, yet it was fairly different.
If we compare the old method header of listDirStructure (pre 2.2) to the current header we can see the following differences:
Old
public static function listDirStructure($dir = '.', $recurse = true, $sort = 'asc', $strip_root = null, $exclude = array(), $ignore_hidden = true) {
Current
public static function listDirStructure($dir = '.', $filter = null, $recurse = true, $strip_root = null, $exclude = array(), $ignore_hidden = true) {
So the changes:
- A parameter has been added after the first parameter,
$filterwhich is a string, not boolean. This string should be a regex to filter the directories - The old second parameter,
$recursereplaces the unused old third parameter,$sort
For a full description, check the docs
Apologies.
Create an account or sign in to comment.
Dear Symphony mates,
I've just updated version 2.1.0 of Symphony to the newest version 2.2, but when I want to create or edit a section the following error appears:
preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash /home/reitdiep/domains/reitdiepmakelaardij.nl/public_html/symphony/lib/toolkit/class.general.php line 874 869 or in_array($file, $exclude) 870 or in_array("$dir/$file", $exclude) 871 ) continue; 872 873 if(!is_null($filter)) { 874 if(!preg_match($filter, $file)) continue; 875 } 876 877 $files[] = str_replace($strip_root, '', $dir) ."/$file/"; 878The server runs on
PHP version 5.2.16andMySQL version 5.0.89.I hope you can help me.