e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

Automated SEF string creation type not functioning on Gallery category URLs #75

Closed CaMer0n closed 11 years ago

CaMer0n commented 11 years ago

eg. http://...../gallery/My Gallery Category is created, while 'dasherize-to-lower-case' is the current setting.

STR82U commented 11 years ago

Sorry to keep shadowing you. Mine is working on but no dashes added - is that it? (../gallery/this Is the Gallery title). Pages seem to resolve. URL Configuration example shows it like that though. Don't know how a search engine will show that since there are no %20 spaces present - they might add it or not, haven't ever seen it happen without space code.

EDIT: Google Chrome has taken to adding the %20 spaces between words, FF has not. ex:/gallery/this%20Is%20the%20Gallery%20title

CaMer0n commented 11 years ago

"../gallery/this Is the Gallery title" will and does work, but that's not the issue. It should respect the pref in admin to use dasherize (and other options) when enabled. Other issues should be in a separate 'issue' here if you want to add it, please do.

CaMer0n commented 11 years ago

Seems to work on the admin side, but is it working for you on the front-end?

STR82U commented 11 years ago

CaM, you mean /gallery/list?cat=gallery_image is what you're seeing instead of Gallery-1 ? Yes, I see it too.

myovchev commented 11 years ago

Sorry about that, should be fine now. Please confirm.

STR82U commented 11 years ago

In the admin it creates the URL with dashes but in the front end there is no dash. Gets replaced with %20

SORRY, not replaced, just a space that the browser fills with %20...

myovchev commented 11 years ago

Rebuild your site routes before testing (hit Update on Administration -> URL Configuration main page)

STR82U commented 11 years ago

Did that by switching SEF to default (save) then back to Gallery (save) then created a new category, added pics but no dashes in public URL. Second test was the same as above but changed the Alias also with same results creating and visiting a 4th category.

Trying to manually visit the rewrite URL as expected bounces back to Gallery main page.

In admin: test-three on front end: gallery/test%20three <<< works on front end: gallery/test-three <<< fails

In admin: arrests-and-mugshots on front end: photos/arrests%20and%20mugshots <<< works on front end: photos/arrests-and-mugshots <<< fails

HAD TO ADD: Mis-typed the path on one of the above.

myovchev commented 11 years ago

You are doing something wrong, as I'm pretty sure what you are saying is not possible (see the change in the controller code to understand why - https://github.com/e107inc/e107/commit/15142cf76bcdbe55e5f3608818c743cd03c39688 ) . If your gallery category is resolved by test%20three this means your SEF string of that category is 'test three'. Possible mistakes:

  1. You didn't update your test site
  2. Browser Cache
  3. Double check your SEF string
STR82U commented 11 years ago
  1. yes I have your updates on my desktop, the files on this test site were downloaded by ZIP from here after you closed issue #76
  2. Using three browsers all day and clearing cache after every change in admin except for Chrome which is the admin usually. FF and Opera were the other two with Safari coming on after your last post. Also used Chrome on wifes computer and FF and Chrome on the Sony Viao in the spare bedroom - cache in site off and cleared anyhow off and on today.
  3. The sef url in dbase is >>> arrests-and-mugshots In admin it's >>>> arrests-and-mugshots Links on the front end >>> arrests and mugshots

You can see it in the source, those dashes are getting removed. Just tried with Safari, which I haven't used with that site today and it shows the same URLs in source.

What I had not noticed is that "Automated SEF string creation type" is set to dasherize-to-lower-case but the links on the front end are Capitalized.

The last thing I've done tonight are all the steps mentioned in the previous posts and then taking the sef url out of the dbase by hand, removing it from the category by hand and saving. Same results. The front end links are CAPS and dashes are missing.

If you need screen shots to believe it I'll start posting when you ask.

STR82U commented 11 years ago

Just checked the test site that has yesterdays current files and the Capitalization was going on then. Admin shows >>> arrests-busts-and-stings but the front end links are >>> Arrests%20In%20Pictures

The theme on yesterdays site is Core, today's was a personal theme that's really basic and has nothing in it but html and css - none of my javascripts or plugins, it's all V2 fresh from Git this morning EST.

I'll get a fresh copy in a few hours and try again.

NOTE: Fresh from this morning but adding the updated files today as they became available.

myovchev commented 11 years ago

So it's 1. - you didn't update your test site. See the commit above your comments.

STR82U commented 11 years ago

The first words of my post after yours was "yes I have your updates on my desktop" meaning they were uploaded before you posted - I didn't just get copies, they were on that test site before you'd made that post.

STR82U commented 11 years ago

Let me be more clear, my apologies if I have not been clear.

When you posted "Sorry about that, should be fine now. Please confirm." I got copies from 15142cf and uploaded them. My next post after yours was from tests done with your new files on my test site which is a live server and not a local setup.

When you posted after that to have me "Rebuild your site routes before testing (hit Update on Administration -> URL Configuration main page)" 15142cf files were on my site.

Just before you said "So it's 1. - you didn't update your test site. See the commit above your comments." I posted "NOTE: Fresh from this morning but adding the updated files today as they became available." to mean that I get emails from github and have been refreshing the site reading notes all day; when updates became available I got copies and uploaded them immediately.

STR82U commented 11 years ago

It took nearly an hour but it worked out. Looks like one of the files was still using the "Title" for the URLs rather than the sef_url - no idea which file, your 15142cf files WERE on the server through our entire conversation minutes after you committed them. Clearing the site's cache and browsers cache's were still preventing the proper operation but the proper changes are on that site now and it works well.

Sorry for the trouble.

myovchev commented 11 years ago

I understand that, but it still sounds as older script version. Check your branches, double check the code you are running against the repo (see again latest commit).

My Local test:

  1. New gallery of type Video with title "Arrests and Mugshots", auto created SEF string is 'arrests-and-mugshots'
  2. Pointing my browser to gallery/ - I see Category "Arrests and Mugshots" with URL localhost/e107/gallery/arrests-and-mugshots, it resolves OK showing pictures I added to that category.

Sorry I can't reproduce the issue and I keep saying it's not possible. URL is disassembled by 'media_cat_sef' field and assembled by the same, so it's something on your side.

myovchev commented 11 years ago

Github need some kind of dynamic comment update I guess :) I didn't refresh the page.

STR82U commented 11 years ago

Gotcha. I'm now seeing that the "Next" link is not SEF - links from this page: /gallery/arrest-photos has a "NEXT" link with the URL /gallery/index/list?frm=3 and it goes 404. The drop down selector is the same: /gallery/index/list?frm=0 /gallery/index/list?frm=3 /gallery/index/list?frm=6

That shows up on one domain with a brand new install and another domain that has been updated from the current ZIP downloaded less than 2 hours ago.

SIDE NOTE: Can I also mention here that the selector in the Gallery admin page doesn't allow multiple selections even though there are multiple gallery categories? or should I post another, separate issue?

myovchev commented 11 years ago

The pagination problem should be posted in separate issue. I'm not following you about the second one, please explain - what selector and where exactly to be found.

STR82U commented 11 years ago

The selector is on the Gallery admin page e107_plugins/gallery/admin_gallery.php labeledd "Slideshow category". It looks like it's supposed to allow the user to select which Gallery/Media category to use for the "Slider" menu.