Author:
community
Version:
0.4
Released:
31 August 2010
Category:
Other

New#2: Table prefix broken

I was getting lots of lines saying

2010/05/29 13:21:52 > WARNING: 512 - MySQL Error (1146): Table 'db330740579.sym_router' doesn't exist in query "SELECT * FROM sym_router" in file .../symphony/lib/toolkit/class.mysql.php on line 401

The reason for that error is just a minor typo at /extensions/router/extension.driver.php:53

$routes = $this->_Parent->Database->fetch("SELECT * FROM sym_router");

should be

$routes = $this->_Parent->Database->fetch("SELECT * FROM sym_router");

Hm… something is broken. I was pretty sure I wrote sym_… Maybe the MySQL class is too aggressive when replacing the table prefix?

Hm… something is broken. I was pretty sure I wrote sym_… Maybe the MySQL class is too aggressive when replacing the table prefix?

Argh… I am messing up big time here. I wanted to type tbl not sym as the prefix.

The code is using “sym router” in every instance now, but table actually being created and used is “sym router” so I can only agree with your diagnosis that the DB access class is aggressivly managing the table name for me!!

I guess I’ll switch all the references back to “sym router”, otherwise it’s just confusing.

OK I’ve just looked at some other extensions, and the “tbl” prefix is being used but they must also be being renamed to use the prefix defined in config.

This is all a bit voodoo for my taste so I’ll be enquiring on the forum as to the best practise.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details