The table prefix must start with a letter

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
tmad40blue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Feb 06, 2012 10:18 pm

The table prefix must start with a letter

Post by tmad40blue » Mon Feb 06, 2012 10:25 pm

I can't believe nobody else has had this issue...

I am attempting to install Joomla! 2.5.1. I cannot get past the Database Configuration phase because of the following error:
Joomla! 2.5.1 Installation wrote:The table prefix must start with a letter, be followed by optional alphanumeric characters and by an underscore
This is unfortunate. My hosting provider does not allow me to change the table prefixes for my database, so it is stuck as 2222_. Is there a fix being worked on for this, or do I need to dive into some files and edit some code?

Thanks!

tuum
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 207
Joined: Fri Sep 19, 2008 12:03 am
Location: Sydney, Australia
Contact:

Re: The table prefix must start with a letter

Post by tuum » Tue Feb 07, 2012 1:00 am

I tried this out on my computer, and yes it does seem that there has been a validation rule added to force the prefix to start with a letter.

This is caused by the regex rule in
/installation/models/rules/prefix/prefix.php

//line 24

Code: Select all

protected $regex = '^[a-z][a-z0-9]*_$';

Which is due to /installation/models/forms/database.xml

Code: Select all

			<field name="db_prefix" type="text" id="db_prefix" class="inputbox"
				label="INSTL_DATABASE_PREFIX_LABEL"
				default="jos_"
				required="true"
			/>

Which was changed to

Code: Select all

			<field name="db_prefix" type="prefix" id="db_prefix" class="inputbox"
				label="INSTL_DATABASE_PREFIX_LABEL"
				required="true"
				validate="prefix"
				message="INSTL_DATABASE_PREFIX_MSG"
			/>

Essentially by changing the field type to "prefix", it causes the prefix rule to validate the field. So you can either adjust the regex string in prefix.php, or change the field type in database.xml to get round this issue.

Sounds like this should be reported as a bug on the Joomla CMS tracker
http://joomlacode.org/gf/project/joomla ... er_id=8103
Tim Plummer - Tweet @bfsurvey

tmad40blue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Feb 06, 2012 10:18 pm

Re: The table prefix must start with a letter

Post by tmad40blue » Tue Feb 07, 2012 1:04 am

Thanks so much for the time, tuum. I'll try our your suggestion this evening and report back my results.

Lawrence1502
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Mar 10, 2014 11:10 am

Re: The table prefix must start with a letter

Post by Lawrence1502 » Sat Mar 15, 2014 7:54 pm

The table prefix must start with a letter, be followed by optional alphanumeric characters and by an underscore

please explain

Lawrence

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: The table prefix must start with a letter

Post by itoctopus » Mon Mar 17, 2014 2:58 pm

Just go with the table prefix that is generated by Joomla and you should be OK - don't change it to start with a number or something other than a letter.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter


Locked

Return to “Installation Joomla! 2.5”