rsanchez / dynamo

Makes Dynamic Parameters behave more like the Search module.
http://devot-ee.com/add-ons/dynamo/
10 stars 2 forks source link

Stuck pagination links on search_id results #2

Closed ghuber closed 13 years ago

ghuber commented 13 years ago

When using {exp:dynamo:entries}, my pagination_links are "stuck" on the same incorrect state on every page, yet {paginate} otherwise returns correct entries and page numbers.

Regular pagination with {exp:channel:entries} works fine.

Using Logiq Pagination for styling, but I don't think this is significant.

I've set up the most basic version to test:

Template #1:

<html>
<body>

{exp:dynamo:form return="template_group/test2"}
    <select name="limit">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="5">5</option>
    </select>
    <input type="submit">
{/exp:dynamo:form}

</body>
</html>

Template #2:

<html>
<body>

{exp:dynamo:form return="template_group/test2" search_id="{segment_3}"}
    <select name="limit">
        <option value="1"{if limit == 1} selected="selected"{/if}>1</option>
        <option value="2"{if limit == 2} selected="selected"{/if}>2</option>
        <option value="5"{if limit == 5} selected="selected"{/if}>5</option>
    </select>
    <input type="submit">
{/exp:dynamo:form}

{exp:dynamo:entries channel="my_channel" dynamic_parameters="limit" search_id="{segment_3}"}
    {count}. {title}</br>
    {paginate}<hr>
    <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
    {/paginate}
{/exp:dynamo:entries}

</body>
</html>

The results are exactly as expected, except for the pagination_links being wrong and unchanging on each paginated page. Using EE 2.2.2.

Am I missing something?

rsanchez commented 13 years ago

Can we try removing Logiq Pagination from the equation? I just want to be absolutely sure that it's not a conflict with that.

ghuber commented 13 years ago

Hah. Totally was Logiq Pagination causing it.

I'll contact the dev.

ghuber commented 13 years ago

Would this have anything to do with it?

http://devot-ee.com/add-ons/support/logiq-pagination/viewthread/246

"The only hook that this looks for when parsing pagination is ‘channel_module_create_pagination’, so unless a module is using the pagination function from the channel module itself, its not going to work with it"

rsanchez commented 13 years ago

I don't think that explains it since Dynamo calls the Channel module. And if that hook wasn't working in Dynamo, then Logiq wouldn't be having any effect at all on Dynamo.

ghuber commented 13 years ago

Hm, well, when I disable Logiq Pagination, the pagination renders correctly.

What else could it be doing that's messing it up?

rsanchez commented 13 years ago

That's what makes me think it has something to do with Logiq itself. Do you know if they're on github somewhere?

ghuber commented 13 years ago

Don't think so, but it's a free download: http://devot-ee.com/add-ons/logiq-pagination

ghuber commented 13 years ago

Rob, looks like Logiq Pagination just doesn't work that well.

I'm going to swap it for AB Pagination (http://devot-ee.com/add-ons/ab-pagination), as soon as they add Structure support (this week?).

Thanks for your help on this, it's not a Dynamo issue.