ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

2.5.3 Pagination Issue after Upgrade

September 13, 2012 7:53pm

Subscribe [3]
  • #1 / Sep 13, 2012 7:53pm

    Hello. I am getting the following error when I try and use {if previous_page} or {if next_page} in our base EE install. This started occurring with the upgrade to 2.5.3.

    A PHP Error was encountered
    Severity: Warning
    Message: trim() expects parameter 1 to be string, array given
    Filename: libraries/Functions.php
    Line Number: 2711

    Any thoughts before I start digging? Thanks!

  • #2 / Sep 17, 2012 1:13pm

    Shane Eckert

    7174 posts

    Hello Michael,

    Thank you for submitting your question.

    Can you show me the code you are using? I would like to see how you are calling the pagination. Is this in the comments or channel entries?

    I tested both in ExpressionEngine 2.5.3 and I am not seeing this at all.

    The line called out is dealing with conditionals, do you see the error when you go to the page or when you click on a pagination link?

    Please let me know.

    Cheers,

  • #3 / Sep 23, 2012 1:11pm

    Removing the conditionals seems to resolve the problem without issue and apparently they are unnecessary anyway as they don’t show unless applicable withing the tag pair. Thanks.

  • #4 / Sep 24, 2012 2:44am

    Julia2986

    3 posts

    i have the same problem.

    Code is

    {if previous_page}
     {previous_page}
      <a href="http://{pagination_url}class=pagination_page">« prev</a>
     {/previous_page}
    {if:else}
     <span class="pagination_page e-pagination_disable">« prev</span>
    {/if}
    {if next_page}
     {next_page}
      <a href="http://{pagination_url}class=pagination_page">next »</a>
     {/next_page}
    {if:else}
     <span class="pagination_page e-pagination_disable">next »</span>
    {/if}


    When i’m login in admin panel and have pagination in entry tag it shows error “Line Number: 2711”. After logout it works fine. When i remove all condition tags {if previous_page} and {if next_page} it works fine even when i login.

    So i removed all conditions cause they actually even don’t work, and i’ve never seen disable type of link which in {if:else} block.

  • #5 / Sep 24, 2012 4:45pm

    Dan Decker

    7338 posts

    Hi Julia2986,

    Welcome to the Forums!

    After removing the conditionals in your code, is everything OK for you?

    Cheers,

  • #6 / Oct 08, 2012 10:24am

    Julia2986

    3 posts

    Hi Dan,

    yes, after removing conditionals it works fine, but what if i want to display something when there is no previous or next page?

  • #7 / Oct 09, 2012 11:17am

    Shane Eckert

    7174 posts

    Hey Julia2986,

    Interesting. What version of ExpressionEngine are you currently using?

    Cheers,

  • #8 / Oct 10, 2012 3:11am

    Julia2986

    3 posts

    Hey Shane,
    i’m using EE v2.5.3 - Build Date: 20120911

  • #9 / Oct 11, 2012 4:30pm

    Kevin Smith

    4784 posts

    Hi Julia2986,

    It doesn’t look like there’s a conditional here that will let you display some bit of text if there isn’t a previous/next page. Perhaps that’s something worth putting in a Feature Request for?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases