Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Slug/URL with same subpages
#1
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
Reply
#2
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!
Reply
#3
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.
Using GetSimple 3.0
Reply
#4
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>
Reply
#5
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!
Reply
#6
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
Reply
#7
nvinanda Wrote:Would you like to suggest GetSimple alternative
we really aren't in the business of suggesting other CMS's around here Smile.

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!
Reply
#8
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 Smile
Using GetSimple 3.0
Reply
#9
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 Smile

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.
Addons: blue business theme, Online Visitors, Notepad
Reply
#10
Did anyone find workaround/hack for this? I would also like to see more than 2 levels in url.
Using GetSimple 3.0
Reply
#11
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#12
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?
Reply
#13
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!
Reply
#14
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.
Reply
#15
Ill post this again.

As a workaround, can you perhaps use.

Code:
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 ?

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

End users will never know the true internal path.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#16
shawn_a Wrote:Ill post this again.

As a workaround, can you perhaps use.

Code:
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 ?

Code:
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.
Reply
#17
I want to do this too - could anyone help with the rewrite rule workaround? I'm a little lost.
Reply




Users browsing this thread: 1 Guest(s)