Topic: Problem with Slug/URL with same subpages

I'm not able to make subpages with same slug under different parent pages.

For Example:
www.website.com/parent1/subpage/
www.website.com/parent2/subpage/ (I need this)
But Get Simple automatically changes the slug to www.website.com/parent1/subpage-1/

Please let me know how to solve this weird problem.

Using GetSimple 3.0

Re: Problem with Slug/URL with same subpages

its not really a weird problem - and i'm not sure how we would fix it.

All pages are saved as {slug}.xml. Since you have two pages with the same slug name, then the system prevents the overwriting by appending a -1 to it.

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: Problem with Slug/URL with same subpages

I never came across this kinda algorithm in the CMSes I used: wp, drupal and joomla.
Please help to get out of this problem if possible or take it as a feature suggestion.

Last edited by nvinanda (2011-04-14 08:45:06)

Using GetSimple 3.0

Re: Problem with Slug/URL with same subpages

nvinanda wrote:

I never came across this kinda algorithm in the CMSes I used: wp, drupal and joomla.
Please help to get out of this problem if possible or take it as a feature suggestion.

Think of the slug as an ID.  They must be unique.  They are in drupal or joomla as well, but in that case they are auto-generated numbers, not text.

-Rob A>

Re: Problem with Slug/URL with same subpages

nvinanda wrote:

wp, drupal and joomla.

These are also database driven CMSs

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: Problem with Slug/URL with same subpages

Thanks, but I can't use it before fixing the "-1" thing.
Would you like to suggest GetSimple alternative (without database) which doesn't append a -1 to this situation?

Using GetSimple 3.0

Re: Problem with Slug/URL with same subpages

nvinanda wrote:

Would you like to suggest GetSimple alternative

we really aren't in the business of suggesting other CMS's around here :).

Sorry the -1 is enough of a hindrance to make you consider leaving GS.

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: Problem with Slug/URL with same subpages

In case GetSimple solves this issue, please update to this thread. I know its difficult because you need to change the whole algorithm of saving and reading posts. Still I'm a big of this CMS :)

Using GetSimple 3.0

Re: Problem with Slug/URL with same subpages

nvinanda wrote:

In case GetSimple solves this issue, please update to this thread. I know its difficult because you need to change the whole algorithm of saving and reading posts. Still I'm a big of this CMS :)

CMS'es you have mentioned prevent editors from saving articles named the same as one of already existing article.
Some CMS'es will automatically add a char by the end/at front (mostly article's ID), some will show an alert and will prevent article from being saved.
Other one will base on article's ID in url, thus there won't be any problems with duplicated names.
But then you'd come up with: "I want  to have SEF URLs".

If you still have a problem with that, just add current date to URL when upon article creation, or add a small piece of code to GS article save function, to make this process automatic.

Last edited by yojoe (2012-01-11 07:14:01)

wujitsu.pl - simple sites, simple solutions, because I like getsimple ;)

Re: Problem with Slug/URL with same subpages

Did anyone find workaround/hack for this? I would also like to see more than 2 levels in url.

Using GetSimple 3.0

Re: Problem with Slug/URL with same subpages

I guess maybe the core could be modified to use subfolders for storage, or maybe you can name your slugs
parent2_subpage

Then have an apache rewrite to always add the parent2 to your subpages if they match a specific name. Then your urls can be whatever you want regardless of your slug names.

Re: Problem with Slug/URL with same subpages

I second this problem,

I run a film based website, so i have different names for films but they all should have the same page names, eg i want.

www.example.com/film-a/plot/
www.example.com/film-a/media/

www.example.com/film-b/plot/
www.example.com/film-b/media/


However i am stuck with having to use

www.example.com/film-a/plot/
www.example.com/film-a/media/

www.example.com/film-b/plot-1/
www.example.com/film-b/media-1/

Could the filename not have a small unique identifyer saved with the .xml name, which strips it out and only uses the user defined slug name?

Last edited by acasperw (2012-02-16 16:56:03)

Re: Problem with Slug/URL with same subpages

acasperw wrote:

Could the filename not have a small unique identifyer saved with the .xml name, which strips it out and only uses the user defined slug name?

It could if we were at the 1.0 release. It was an assumption i made 2 years ago, that turned out to be not the best, but it's something that would take A LOT of change at this point to fix

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: Problem with Slug/URL with same subpages

ccagle8 wrote:
acasperw wrote:

Could the filename not have a small unique identifyer saved with the .xml name, which strips it out and only uses the user defined slug name?

It could if we were at the 1.0 release. It was an assumption i made 2 years ago, that turned out to be not the best, but it's something that would take A LOT of change at this point to fix

I totally understand, i think its something you should look into for a future release, as its not a isolated incident, and it seems like a logical move forward.

Re: Problem with Slug/URL with same subpages

Ill post this again.

As a workaround, can you perhaps use.

http://www.example.com/film-a/film-a_plot/
http://www.example.com/film-a/film-a_media/
http://www.example.com/film-b/film-b_plot/
http://www.example.com/film-b/film-b_media/

And use a apache rewrite rule to match the root and prepend it to your slug url so your urls can look like this ?

http://www.example.com/film-a/plot/
http://www.example.com/film-a/media/

End users will never know the true internal path.

Last edited by shawn_a (2012-02-17 10:47:52)

Re: Problem with Slug/URL with same subpages

shawn_a wrote:

Ill post this again.

As a workaround, can you perhaps use.

http://www.example.com/film-a/film-a_plot/
http://www.example.com/film-a/film-a_media/
http://www.example.com/film-b/film-b_plot/
http://www.example.com/film-b/film-b_media/

And use a apache rewrite rule to match the root and prepend it to your slug url so your urls can look like this ?

http://www.example.com/film-a/plot/
http://www.example.com/film-a/media/

End users will never know the true internal path.

Thanks ill look into it, however my knowledge of Apache rules extend to allowing my forum to be excluded from get simple rules and simple "Website down for maintainance" redirect pages.