WebsiteBaker Support (2.11.x) > Modules
Drag and Drop not working in OFA when modulename contains hyphens
DarkViper:
it's a rule and not a bug.
--- Quote from: https://secure.php.net/manual/en/language.variables.basics.php ---Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
--- End quote ---
Unfortunately, I do not know OFA to the last detail but only from a short review of the code. Especially not the JS parts.
However, I have seen that in different places the module name is also used as a variable name. As well as table names and field names in the database.
At least in PHP are hyphens in variable names not allowed (see Quote). Likewise, mySql can cause problems in strict mode. Also, I can vaguely remember that JS has several problems here too.
The simplest and most important solution is not to use hyphens in module names. There are absolutely no factual reasons for their use.
Manuela
dbs:
--- Quote ---At least in PHP are hyphens in variable names not allowed
--- End quote ---
Therefore the info.php rename whitespaces and hyphens to underscore. But something work not right in my test.
Maybe the installer can't do it right in the zip.
dbs:
The new version 2.0.2.22 should solv the problem.
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=04238F62
Navigation
[0] Message Index
[*] Previous page
Go to full version