Item Name Can't be Single Number

6 views
Skip to first unread message

Phil

unread,
Jan 24, 2012, 6:18:54 AM1/24/12
to in-por...@googlegroups.com
Hello guys,

it appears that an item name can't be a single number, like "1" for example. It's not a bug, as I don't see any point to have a link or product named like this, but may we should regexp-check (try to read it loudly ^-^) items names on validation.

phil

Alexander Obuhovich

unread,
Jan 24, 2012, 7:21:09 AM1/24/12
to in-por...@googlegroups.com
This is more system-wide problem as long we allow any trailing number in mod-rewrite url to be interpreted as page number in list.

We either can add rexexp to any unit, that appears in url (theme name, laguage pack name, link/article/product name) or just don't parse last number in url as list page number.

How should we do it?

Dmitry A.

unread,
Jan 29, 2012, 12:33:20 PM1/29/12
to in-por...@googlegroups.com
Need to think more about drawbacks of each case, and may be checkout other systems.

DA

Alexander Obuhovich

unread,
Jan 29, 2012, 1:09:30 PM1/29/12
to in-por...@googlegroups.com
When we disabled parsing trailing numbers from url it will make all indexed links to website (e.g. by google) lead to first page in list instead of list page, that was indexed. Or maybe they all will lead to 404 pages. Need to try disabling and see what happens.


On Sun, Jan 29, 2012 at 7:33 PM, Dmitry A. <dand...@gmail.com> wrote:
Need to think more about drawbacks of each case, and may be checkout other systems.

DA



Dmitry A.

unread,
Feb 1, 2012, 10:02:33 PM2/1/12
to in-por...@googlegroups.com
Hi Alex,


What exactly do you mean by "add rexexp to any unit, that appears in url (theme name, laguage pack name, link/article/product name) "? How does this help the situation?


DA

Alexander Obuhovich

unread,
Feb 2, 2012, 3:31:25 AM2/2/12
to in-por...@googlegroups.com
There are 2 ways of solving a problem:
  1. doesn't allow a product name (or link or article name) to consists only from numbers (e.g. 5) - this is where regex comes in
  2. don't use /5.html urls to create links to 5th page

Dmitry A.

unread,
Feb 7, 2012, 11:43:59 PM2/7/12
to in-por...@googlegroups.com
Here is a LIVE example of In-Portal website which uses /5.html for Pagination:



To be honest I don't know what is the best since I never had a need to create a Product or other Catalog Item with Numbers only in it...


DA

Alexander Obuhovich

unread,
Feb 8, 2012, 3:20:55 AM2/8/12
to in-por...@googlegroups.com
But user is allowed to create it which then leads to a bug.

Also website you've mentioned is either on 4.x version or on 5.0.x version of In-Portal where Main List concept wasn't implemented. When Main List concept in use, then pagination links have .html?page=5 instead of /5.html in url.

Dmitry A.

unread,
Feb 8, 2012, 1:13:08 PM2/8/12
to in-por...@googlegroups.com
Well this kind of answers your own question about which approach to choose.

If we use in In-Portal 5.x - .html?page=5 instead of /5.html in url - I guess we should stick to it and allow Numbers don't you agree? Or I am missing something here?


DA

Alexander Obuhovich

unread,
Feb 8, 2012, 1:59:44 PM2/8/12
to in-por...@googlegroups.com
Then we shouldn't threat trailing numbers in url as page number since ?page=N is a new syntax for now.

I'll just hope that any urls indexed by crawlers where there is still /N.html would be still correctly parsed. I guess they all will result in 404 pages, since trailing number in url won't be parsed by In-Portal as since it's not parsed a 404 page will be shown.



Dmitry A.

unread,
Feb 10, 2012, 4:52:04 PM2/10/12
to in-por...@googlegroups.com
I do some tests in 5.2.0 shortly.


DA
Reply all
Reply to author
Forward
0 new messages