News:

Looking for documentation? Take a look on our wiki

Main Menu

Template overrride filename length

Started by coffeetogo, February 18, 2021, 10:44:31 AM

Previous topic - Next topic

coffeetogo

PHP 7.4.6
VirtueMart 3.8.8 10472
Joomla! 3.9.24

Hi,

Just wanted to check on something in regards to template overrrides.

I couldn't get the overrrides to work. I created a template in the productdetails overrride folder but everytime I picked my template from the "Product Details Page" dropdown box  in a product and saved it just went back to the default.

Finally tracked down that this happens if the filename (excluding .php) is 17 characters or more. Change the filename to 16 characters or less and its fine.

Is there a limit on the length of filenames?

Thanks

D

coffeetogo

More info as I noticed that there are long filenames using an "_". This is when the filename doesn't have an underscore i.e "1234567890123456.php". Same result in a TemplateToaster template and the VMBeez3 template.

jenkinhill

I can't duplicate this on my server. Even this override file worked OK as an override.  defaulttemplatetestinarowoffour.php
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

coffeetogo

Hi Kelvyn,

done some testing. Setup two new sites on two different hosting services. Only joomla and virtuemart installed and still get the issue with the filename length.

Tried changing the PHP level but had no effect. Not sure what else to try as I've changed nothing from the original installation other than currency.

Any thoughts appreciated.

Thanks

D

Jörgen

What template are You using besides this homemade override ? Tried to use VMBeez and add this override ?

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

coffeetogo

Hi Jorgen,

I get the same result on all three installled default templates (Beez, VMBeez and protostar).

The sites are just for testing this issue so if you'd like a login to see what's happening I can send you it to you.

Thanks

D

jenkinhill

I just re-read your op and it mentions "in a product".  I apply product layout overrides in (usually) a specific category or for all products in Config/templates and can state that long filenames work OK there.  But I just tried for a single product and can confirm that a long filename is not saved there. Strange.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

coffeetogo

Hi Kelvyn,

Glad you have been able to reproduce it. Thought I was going bonkers or doing something silly.

Good to know I can use the category overide and I will just make sure the override names are short enough when I get to my miscellanious category where a number of layouts are need.

Thanks for your time and help.

Regards

D