News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Character limit on template filenames

Started by jan suhr, December 22, 2011, 12:22:38 PM

Previous topic - Next topic

jan suhr

Thanks for a great update, I have been waiting for a long time for this!


I just found out that there is a limit on the number of characters that a custom template file can have. The database field for template names has a limit of 16 characters which is quite low.

I need to do some template overrides to get the layout I want, I am using Rocket Theme Mercado template in J1.7.

In the category settings the template file shows up from the HTML override folder but if the filename is over 16 characters it will be trunctuated in the DB and consequently can't be found.

I think this is a major flaw and the DB field should be set to 255 characters.

OK I can change that myself but that could maybe be overriden in some update later on.


Jan
Jan Suhr
Color Consult AB
Stockholm, Sweden

Milbo

We use

  `category_template` char(24),
  `category_layout` char(16),
  `category_product_layout` char(16),

We should set all of this to 255? I also thought about to add some database tools, which help to set this values. On the other side, people should use short names.

But I see, either we use char 255 or we provide a nice tool, which can be used by in case.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alistair|ctyou

I just tripped over one of the character limits when trying to set a different Category Browse Page.

If Category Browse Page is set to anything over 16 characters it's silently truncated when stored as category_layout in the database.

I think there should be a note explaining the limit or error handling because currently something is stored in the database but the form field still shows 'No override' after being saved, which is confusing for anyone who wouldn't go and check the database and could result in undesirable behaviour if what is stored matches another file name (inconsistent).

Short filenames - sure 8.3 was funny - do we really need the extra 8?

Milbo

new values
`category_template` char(128),
  `category_layout` char(64),
  `category_product_layout` char(64),

better?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/