Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: PHP error in better pagination - I know not supported :)

Status Resolved
Add-on / Version
Severity Critical
EE Version 27

PhilBrienesse

Jan 31, 2013

Hey, I know better pagination is free and not supported so if you dont have time I understand. It was working great on my local machine dev environment which runs PHP 5.2.11. Time came to move the site over to the host server and now it is putting up PHP errors and not outputting the pagination links. Host server runs 5.3.3

PHP Error is


A PHP Error was encountered

Severity: Warning

Message: Parameter 1 to Better_pagination_ext::channel_module_create_pagination() expected to be a reference, value given

Filename: libraries/Extensions.php

Line Number: 241
A PHP Error was encountered

Severity: Notice

Message: Undefined index: pagination

Filename: better_pagination/ext.better_pagination.php

Line Number: 158
A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: better_pagination/ext.better_pagination.php

Line Number: 158


Output now looks like this on the site where before it was perfect.

{previous_page} Previous {/previous_page} {page} {pagination_page_number} {/page} {next_page} Next {/next_page}

not parsing the tags it would seem.

here is the template code

{if segment_2 == ""}
  <h2>Latest News</h2>
<p>  {exp:channel:entries channel="news" limit="1" dynamic="no" status="not closed" paginate="bottom" offset="{global:pagination_offset}"}<br />
    </p><div class="summaryItem">
<p>      </p><p class="newsDate">{entry_date format="%F %n, %Y"}</p>
<p>      </p><h4><a href="{page_url}" title="{title}">{title}</a></h4>
<p>      {cf_summary}<br />
      </p><p class="readmore"><a href="{page_url}" title="{title}">read more</a></p>
<p>    </p>
</div>
<p>    {paginate}<br />
      </p><p class="pagination">
        {previous_page}
          <a href="{pagination_url}" title="Previous" class="arrow-prev pager-element">Previous {!-- Or {text} --}</a>
        {/previous_page}
        {page}
          <a href="{pagination_url}"class="current">{pagination_page_number}</a>
        {/page}
        {next_page}
          <a href="{pagination_url}" title="Next" class="arrow-next pager-element">Next  {!-- Or {text} --}</a>
        {/next_page}
      </p>
<p>    {/paginate}<br />
  {/exp:channel:entries}<br />
{/if}

the recent news page has a pagination example on it if you are checking it out.

Any hints on how to address this would be greatly appreciated.

#1

Kevin Jacoby

Having the same problem as Phil - although I didn’t test it locally I’m getting the same PHP errors with PHP version 5.3.10.

Any ideas?

#2

Kevin Jacoby

Removed the ‘&’ on line 310 in front of pagination and this got rid of the errors. However the url of the links are all something like this: /blog?&page;=&page=10 which I believe might be Structure’s problem. Not exactly sure but I will keep investigating.

Login to reply