Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Search Engine Friendly URLs v1.0 : bug in displaying categories with many albums  (Read 10530 times)

0 Members and 1 Guest are viewing this topic.

thumeau

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

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

« Last Edit: January 25, 2006, 08:42:18 am by Abbas Ali »
Logged

the_todd

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 42
    • JoomBla!

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

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"
Logged

micster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Cyber Coalition

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

an "idea" for a plugin? Hehe, good joke. It actually is a plugin.
Logged

micster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Cyber Coalition

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.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

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

micster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Cyber Coalition

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
Logged

micster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Cyber Coalition

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
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

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

micster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Cyber Coalition

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

@Devs: Should i commit the changes in devel as well as stable?
Yes, please commit both to devel and stable
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

Fix committed. Marking the thread as fixed.
Logged
Chief Geek at Ranium Systems

mainpower

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
    • Photo album of ... (with CPG)

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
Logged

Nibbler

  • Guest

Please don't use the bugs board for requesting new functionality.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

...feature requests should go into the board that is named "Feature requests"
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.