MODx Bug/Feature Tracker and Feature Requests
Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!
FS#140 — install problem: table prefix with a dash fails!
Attached to Project —
MODx
Opened by Remon (Remon) - Monday, 28 November 2005, 02:10PM
Last edited by Jason Coward (opengeek) - Friday, 29 December 2006, 07:24PM
Opened by Remon (Remon) - Monday, 28 November 2005, 02:10PM
Last edited by Jason Coward (opengeek) - Friday, 29 December 2006, 07:24PM
| Task Type | Bug Report |
|---|---|
| Category | Core Distribution |
| Status | Closed |
| Assigned To |
Jason Coward (opengeek) |
| Operating System | All |
| Severity | High |
|---|---|
| Priority | Normal |
| Reported Version | 0.9.0 |
| Due in Version | 0.9.6 |
| Due Date | Undecided |
| Percent Complete |
|
Details
Installing modx with a table prefix containing a dash ( - ), causes a mysql error, file attached.Best,
Remon
This task depends upon
This task blocks these from closing
Closed by Ryan Thrash (rthrash)
Saturday, 14 April 2007, 09:47AM
Reason for closing: Fixed
Additional comments about closing: tested successfully in 096 builds
Saturday, 14 April 2007, 09:47AM
Reason for closing: Fixed
Additional comments about closing: tested successfully in 096 builds
rev-538_install_error.txt
We'll have to choose between forcing all table names to be quoted with backticks (`) or not supporting special characters or reserved words in the table_prefix value.
- Field changed: Status (Researching → Requires testing)
- Field changed: Due in Version (1.0 → 0.9.6)
- Field changed: Percent Complete (50% → 100%)
- Task assigned to Jason Coward (opengeek)
It took over 600 manual changes by hand and half-a-day of testing, but I think I made the MODx core and all bundled snippets work by escaping all instances of prefix + tablename be surrounded in backticks. It was not easy not pleasurable, but it's done.Other components will need to be updated as well to be compliant with this. The best way to be compliant is to use $modx->getFullTableName('table_name_without_prefix'); to retrieve it.
- Field changed: Severity (Low → High)
Changing this to severity high for more attention. This problem was prevalent throughout the core and bundled components, so I can only imagine it is a pervasive problem with other components.