• Resolved Fuzquia

    (@fuzquia)


    my pages are set to 10 images per page. I now have 11 entries. when I click on ‘2’ to go to second page of entries I get ‘not found’.

    the link to page 2 is ?post_id=1444&order=recent&p=1

    i tried to edit the page 2 link to ?post_id=1444&order=chrono&p=1

    but this completely messes up the images, they lose the polaroid frame and overlay on top of each other.

    I have also tried updating the admin setting to show ’20’ images per page, but this does not update the current competition?

    anyone know how I could fix this?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Fuzquia

    (@fuzquia)

    Hi frekel, I understand you may not have answered my post as my problem is fixed in the next version. But as with clarice393 I have a competition running already.

    Could you advise if there is a fix I could apply just now until my current contest ends? I have many entries but people can only view/vote on the first 9.

    Plugin Author frekel

    (@frekel)

    Can you tell me which version you are using??

    if version 1.5.4 change the following

    around line 283:

    $scrolling              = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,'recent');

    to

    $scrolling              = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,'recent','refresh');

    and add around line 412:

    elseif ($base_url == 'refresh')
                {
                      $base_url = 'wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
                }

    Greets,
    Frank

    Thread Starter Fuzquia

    (@fuzquia)

    ok I managed to find this line of code:

    $scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,’recent’,’refresh’);

    as above in ‘wp-photocontest.class.php’. So I changed it to:

    $scrolling = $this->get_page_scrolling($post_id, $number_of_photos, $p, $number_of_pages,’recent’,’refresh’);

    however ‘wp-photocontest.class.php’ does not have 412 lines. could you advise where to add:

    elseif ($base_url == ‘refresh’)
    {
    $base_url = ‘wp-content/plugins/wp-photocontest/view.php?post_id=’.$post_id.’&order=’.$order;
    }

    adding it to the end of ‘wp-photocontest.class.php’ takes my whole site offline. thank you.

    Plugin Author frekel

    (@frekel)

    What version are you using??

    Thread Starter Fuzquia

    (@fuzquia)

    sorry forgot to say it was version 1.5.4 I am using, thank you

    Plugin Author frekel

    (@frekel)

    It should have more lines…

    But look for the function:
    function get_page_scrolling

    change:

    if ($base_url == 'admin')
    {
        $base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
    }
    else
    {
        $base_url = '?post_id='.$post_id.'&order='.$order;
    }

    into

    if ($base_url == 'admin')
    {
        $base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
    }
    elseif ($base_url == 'refresh')
    {
        $base_url = 'wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
    }
    else
    {
        $base_url = '?post_id='.$post_id.'&order='.$order;
    }
    Thread Starter Fuzquia

    (@fuzquia)

    ok I have changed code as per last post and still get 404 error

    Thread Starter Fuzquia

    (@fuzquia)

    I have just had a look at another website running the same version of this photo contest. The code you are advising me to change is the exact same in this other 2nd site. The 2nd site does not have the 404 error.

    So I am thinking changing this code as you describe is not the problem/solution.

    I think it may be a bug related to creating a photo contest with the same url? i.e. last month I created ‘/photo-contest’. When this finished I had to delete the contest and create a new one. So I re-created a new ‘photo-contest’. However it automatically created ‘/photo-contest-2’.

    The 2nd site I talk about is identical right down to the theme & version of your plug used. But it has not had a 2nd contest created as yet. It is still running the same original contest. It does not have the same 404 problem, the 2nd page of images are displayed with no problem.

    Do you think this ‘/photo-contest-2’ url may have something to do with it?

    Thread Starter Fuzquia

    (@fuzquia)

    is there a way to modify the code so that I can change the number of images shown per page? the admin settings do not change a live contest.

    I think if I could just change this, then all images would simply show on page 1, removing my 404 error for additional pages. then I can upgrade the plug before starting next months competition.

    is this a possible solution?

    Plugin Author frekel

    (@frekel)

    Can you send my your url?

    Plugin Author frekel

    (@frekel)

    Ok, this is a quick fix for your eyes only ??

    You need to add a slash to the base_url. (so $base_url = ‘wp-content……’ gets $base_url = ‘/wp-content……’)

    if ($base_url == 'admin')
    {
        $base_url = '?page=wp-photocontest/photocontest-manager.php&mode=view_contest&contest_id='.$post_id.'&order='.$order;
    }
    elseif ($base_url == 'refresh')
    {
        $base_url = '/wp-content/plugins/wp-photocontest/view.php?post_id='.$post_id.'&order='.$order;
    }
    else
    {
        $base_url = '?post_id='.$post_id.'&order='.$order;
    }

    Greets,
    Frank

    Thread Starter Fuzquia

    (@fuzquia)

    Thank you for all your help Frank, your offline help is also appreciated. first class support thank you.

    Plugin Author frekel

    (@frekel)

    No problem!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: PhotoContest Plugin] page 2 not found’ is closed to new replies.