forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: thumeau on July 20, 2005, 08:46:18 am

Title: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
Post by: thumeau on July 20, 2005, 08:46:18 am
Dear admins,
This is my first bug report for Coppermine so I hope I'm not breaking the forum rules here... (I'm running the 1.4.1 and I have checked if this is not reported before...)

Here is my config:
- CPG 1.4.1 (not modified)
- Hard wire theme (but I noticed the issue with other theme)

This issue occures when the "Search Engine Friendly URLs v1.0" plugin is installed.

When I have a category that contains more than 12 albums, it requires more than 1 page to display all the albums. (my "Number of albums to display" is 12, the default value)

The issue comes when trying to display a page which is not the default one.

For example on my web site:
http://www.photo-culture.com/index-45.html  ----------------------------> Works (gives the 1st page of albums)
http://www.photo-culture.com/index-45-page-3.html -------------------> Doesn't work (returns an error)
http://www.photo-culture.com/index.php?cat=45&page=3 ----------> Works (same page without the SEF plugin)

I hope this is clear enough.
If not, I can post some screen shots.


Finally, thanks to the Coppermine team for the great work!!

Best regards,
Thomas

Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: the_todd on July 21, 2005, 10:27:22 am
There are many issues with this plugin, while I haven't confirmed the bug above, i'll sure add to the list. I wasn't going to start a new topic about it, but now that someone has (for the second time?) i'll just add a few:


ok, lol, thats it right now, just everything with the thumbnails.php

~Todd
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Joachim Müller on July 21, 2005, 10:39:48 am
I agree, the SEF plugin is still experimental. We should add a warning...
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Joachim Müller on August 01, 2005, 08:33:43 am
added a arning message on the plugin page:
Quote
Warning: this plugin is still experimental, there are known issues when using it. Test thoroughly and use at your own risk.
. Marking this thread as "known issue"
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: micster on January 23, 2006, 01:10:28 am
I think this is a wonderful idea for a plugin, I could really use it! Any idea when some of these "known Issues" might be worked out? Are there future releases planned?
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Joachim Müller on January 23, 2006, 08:20:43 am
an "idea" for a plugin? Hehe, good joke. It actually is a plugin.
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: micster on January 24, 2006, 10:24:21 am
LOL... I didn't mean for it to come out like that. I guess because it didn't work on my site I couldn't quite see it as an actual plugin yet. I hope development on it doesn't stop though.
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Abbas Ali on January 24, 2006, 12:42:16 pm
Solution for above reported bugs

Edit plugins/sef_urls/codebase.php

Add

Code: [Select]
    // Rewrite thumnails.php?album=[album]&cat=[cat]&page=[category] URLs to thumbnails-[album]-[category]-page-[page].html
    $html = preg_replace('/thumbnails\.php\?album=([a-z0-9]+)(\&|\&)cat=([0-9]+)(\&|\&)page=([0-9]+)/i','thumbnails-$1-$3-page-$5.html',$html);

just after

Code: [Select]
    // Rewrite index.php?cat=[category] URLs to index-[category].html
    $html = preg_replace('/index\.php\?cat=([0-9]+)/i','index-$1.html',$html);

then edit .htaccess (ht.txt)

Add

Code: [Select]
RewriteRule index-([0-9]*)-page-([0-9]*)\.html index.php?cat=$1&page=$2 [NC]

just after

Code: [Select]
RewriteRule index-([0-9]*)\.html index.php?cat=$1 [NC]

and then Add

Code: [Select]
RewriteRule thumbnails-([a-z0-9]*)-([0-9]*)-page-([0-9]*)\.html thumbnails.php?album=$1&cat=$2&page=$3 [NC]

just after

Code: [Select]
RewriteRule thumbnails-([a-z0-9]*)-page-([0-9]*)\.html thumbnails.php?album=$1&page=$2 [NC]

@Devs: Should i commit the changes in devel as well as stable?
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: micster on January 25, 2006, 03:45:52 am
Thanks for the prompt reply Abbas Ali,
  I made the changes you outlined but I still get "File Not Found". This happens no matter which album I select. If I click any thumbnail I get a 404 error.
 Heres the location of my gallery : www.cybercoalition.com (http://www.cybercoalition.com/gallery/)

In the last step you say to edit .htaccess (ht.txt) I found a "ht.txt" file sitting next to codebase.php do I need to rename this file to .htaccess? I'm not sure how this plugin works... does it create something like a symbolic link? It doesn't actually create REAL html pages does it? Is there something else I need to do to intialize this plugin?

 I know that it is still in development, but I have seen it working on other peoples website's and would like to also have it for my own :) I love CopperMine and I think you guys are doing a great job, keep up the good work! In the mean time I will keep researching this problem to see if I can work it out. Thanks for all your help already.

-Mic
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: micster on January 25, 2006, 04:06:16 am
I've come across a few other threads that mention "mod_rewrite"... how do I check if this is enabled on my server? It is my server so I have root access. I'm also looking into how .htaccess is setup on our sever. I already have a few other scripts running that require .htaccess files to run, but I think this is where my problem is.

-Mic
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
Post by: Abbas Ali on January 25, 2006, 05:58:13 am
You will have to rename ht.txt to .htaccess and copy it to root folder of coppermine. First try this and lets see whether mod_rewrite is enabled or not.

Also this is a bug thread... so if you are having troubles installing the plugin, please open a new support thread.


Abbas
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: micster on January 25, 2006, 07:41:16 am
Thank you so much!

I feel kinda silly because I didn't know where to put that .htaccess file. I uploaded it straight into the root of my Copper Mine gallery and it all started to magically work. Thanks again Abbas Ali, you saved me countless additional hours with that ;)

-Mic
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Joachim Müller on January 25, 2006, 07:56:42 am
@Devs: Should i commit the changes in devel as well as stable?
Yes, please commit both to devel and stable
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
Post by: Abbas Ali on January 25, 2006, 08:40:41 am
Fix committed. Marking the thread as fixed.
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
Post by: mainpower on February 04, 2006, 12:10:18 pm
Hello, would it be easy to include file-name in address for better ranking ???

Now I have:
http://www.vanwageningen.net/photos/displayimage-11-0.html (http://www.vanwageningen.net/photos/displayimage-11-0.html)

But I would like to have something like;
http://www.vanwageningen.net/photos/displayimage-11-Pic001-Baikal_Seal_at_Leipzig_Zoo.html

I think it's a great plugin though :-)

Thanks,
Matthijs
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
Post by: Nibbler on February 04, 2006, 12:13:10 pm
Please don't use the bugs board for requesting new functionality.
Title: Re: Search Engine Friendly URLs v1.0 : bug in displaying categories with many al
Post by: Joachim Müller on February 04, 2006, 01:01:20 pm
...feature requests should go into the board that is named "Feature requests (http://forum.coppermine-gallery.net/index.php?board=7.0)"