Advanced search  

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

Pages: [1]   Go Down

Author Topic: Cannot sort any album by title/data/position  (Read 2636 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Cannot sort any album by title/data/position
« on: March 18, 2012, 07:34:45 pm »

Latest CPG here.
The sort worked great until some time ago.
If you try to open any album and try to change the default sort order (ie. ascending date), you'll get a message stating that the selected file/album doesn't exist.
No matter what sort method I choose in the admin panel, it always sorts the thumbnails by name, while I prefer ascending data.
I disabled the Search Engine Friendly URLs plugin and deleted the htaccess file in order to see if it was the culprit, but it wasn't...
Any hints?
Thanks

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Cannot sort any album by title/data/position
« Reply #1 on: March 18, 2012, 10:12:48 pm »

errata corrige: I see that error message, but if I reload the album page the sort is correctly changed. I don't know which non-existent file/album CPG is referring to.
I've checked for error.log files in my webserver and found nothing.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Cannot sort any album by title/data/position
« Reply #2 on: March 19, 2012, 11:20:35 am »

There's probably something wrong with your theme, as it doesn't replace any of the placeholder tokens:
Quote
   {TITLE}     +      -           {NAME}     +      -           {DATE}     +      -           {POSITION}     +      -

This results in links like
Quote
http://www.flapane.com/gallery/thumbnails.php?album={AID}&page={PAGE}&sort=da


Check your theme or attach it as zip file to your next reply.
Logged

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Cannot sort any album by title/data/position
« Reply #3 on: March 19, 2012, 11:48:04 am »

Gotcha!
The sort section of my theme.php was using the older sort method. Too bad I created my theme starting from my old original cpg 1.4 theme.
 
I changed
Code: [Select]
  <td width="100%" class="statlink">{ALBUM_NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;">{TITLE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=ta" title="{SORT_TA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=td" title="{SORT_TD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{NAME}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=na" title="{SORT_NA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=nd" title="{SORT_ND}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{DATE}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=da" title="{SORT_DA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=dd" title="{SORT_DD}">&nbsp;-&nbsp;</a></span></td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="sortorder_options" style="font-size: 100%;">{POSITION}</td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pa" title="{SORT_PA}">&nbsp;+&nbsp;</a></span></td>
                                <td class="sortorder_options" style="font-size: 100%;"><span class="statlink"><a href="../../../gallery/thumbnails.php?album={AID}&amp;page={PAGE}&amp;sort=pd" title="{SORT_PD}">&nbsp;-&nbsp;</a></span></td>

with this
Code: [Select]
                                 <td style="text-align:right;" class="sortorder_cell" id="sortorder_cell">
                    <!-- Use JavaScript to display the sorting options only to humans, but hide them from search engines to avoid double-content indexing (js/thumbnails.js) -->
                </td>

Thanks
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.