Zen Cart Logo
Forums / All Other Contributions/Addons / Dashes not allowed in pages? - SSU module

Dashes not allowed in pages? - SSU module

Locked

Views: 766

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Feb 2010, 8:38 PM
#1
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Dashes not allowed in pages? - SSU module

Trying to create a new page as described here:
http://www.zen-cart.com/wiki/index.php/Creating_new_pages

Everything seems to go well except I tried to name one page with dashes in it ie: 'tax-info'

This didn't work for some reason. Yet underscore works fine 'tax_info'

I would prefer to use dashes over underscores. Is there something I'm missing or did I just hit another Zencart quirk?

3 Feb 2010, 10:34 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Dashes not allowed in pages? - SSU module

I would prefer to use dashes over underscores. Is there something I'm missing or did I just hit another Zencart quirk?
I do not believe this is only a ZenCart item

10 May 2010, 3:43 PM
#3
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: Dashes not allowed in pages? - SSU module

Just an update... This seems to be a problem/feature with the SSU module.

11 May 2010, 3:27 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Dashes not allowed in pages? - SSU module

llynix:

Trying to create a new page as described here:
http://www.zen-cart.com/wiki/index.php/Creating_new_pages

Everything seems to go well except I tried to name one page with dashes in it ie: 'tax-info'

This didn't work for some reason. Yet underscore works fine 'tax_info'

I would prefer to use dashes over underscores. Is there something I'm missing or did I just hit another Zencart quirk?

This is a problem that is caused by "loosely typed" languages such as PHP.

In simple terms, "tax_info" is being treated as a string, but 'tax-info' is being treated as a mathematical operation on 2 numeric variables.

Spaces in filenames should also be avoided for similar reasons.

There are ways to overcome the problem, but as a general rule it is best to avoid them in the first place.

Cheers
Rod