Forum

Thread tagged as: Problem, Error

Pagination bug: 'prev_url' not populated

I encountered a problem where the previous page's URL wasn't being generated in the default Perch pagination template, yielding this output:

<a href="">Previous</a>

Using <perch:showall/>, I was able to determine that the prev_url variable was left unset. (next_url appears to be set correctly.)

Since prev_page_number is set, I have been using the following workaround in the default template to generate a link to the previous page:

<a href="?page=<perch:content id="prev_page_number" type="hidden" encode="false" />">Previous</a>

However, this is unideal, since not every paginated element may conform to the ?page= syntax.

Nicole Mirea

Nicole Mirea 2 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see your Diagnostic Report please?

Here is our latest Diagnostic Report.

Updated to short version.


HEALTH CHECK Perch Runway is up to date PHP 5.4.37 version is okay, but a little out of date. Consider updating soon. MySQL 5.5.41-cll-lve is up to date Image processing available SUMMARY INFORMATION Perch Runway: 2.8.7, PHP: 5.4.37, MySQL: 5.1.59, with PDO Server OS: Linux, apache2handler Installed apps: content (2.8.7), assets (2.8.7), categories (2.8.7), perch_blog (4.6), collection_4 (2.8.7), perch_events (1.9.2), perch_forms (1.8.3), perch_gallery (2.8.6), collection_1 (2.8.7), collection_5 (2.8.7), perch_podcasts (1.1), perch_backup (1.2) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_events', 'perch_podcasts', 'perch_forms', ); ?> PERCH_LOGINPATH: /perch PERCH_PATH: /var/www/domains/ioes/html/perch PERCH_CORE: /var/www/domains/ioes/html/perch/core PERCH_RESFILEPATH: /var/www/domains/ioes/html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 250M, Max POST 250M, Memory: 256M, Total max file upload: 250M Resource folder writeable: Yes HTTP_HOST: www.environment.ucla.edu DOCUMENT_ROOT: /var/www/domains/ioes/html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Is this the diagnostic report you meant, Rachel?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes please.