Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums

Started by thumeau, July 20, 2005, 08:46:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thumeau

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


the_todd

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:


  • additional pages past 1 of last uploads doesn't work because: thumbnails-lastup-0.html&page=2  , same thing with toprated. Basically all URLs with the thumbnails.php don't work past the first page.

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

~Todd

Joachim Müller

I agree, the SEF plugin is still experimental. We should add a warning...

Joachim Müller

added a arning message on the plugin page:
QuoteWarning: 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"

micster

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?

Joachim Müller


micster

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.

Abbas Ali

Solution for above reported bugs

Edit plugins/sef_urls/codebase.php

Add


    // 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


    // 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


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


just after


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


and then Add


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


just after


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?
Chief Geek at Ranium Systems

micster

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

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

micster

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

Abbas Ali

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
Chief Geek at Ranium Systems

micster

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

Joachim Müller

Quote from: Abbas Ali on January 24, 2006, 12:42:16 PM
@Devs: Should i commit the changes in devel as well as stable?
Yes, please commit both to devel and stable

Abbas Ali

Chief Geek at Ranium Systems

mainpower

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

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

Nibbler


Joachim Müller