[[ previousentry ]] / [[ nextentry ]] not working

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

[[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Tue Feb 11, 2014 6:14 am

I'm in the process of redesigning my website. So, I've got a test weblog set up using the same categories as my regular weblog, but with a new set of templates. On my regular weblog, I have an entrypage_template.html file, which calls a _sub_fullentry.html template; in the _sub_fullentry.html template, I have the following lines:
Code: Select all
                <div class="prevnext">
                    <div class="previous">[[ previousentry text='<a href="%link%">previous entry on site</a> ' ]]</div>
                    <div class="next">&nbsp; [[ nextentry text=' <a href="%link%">next entry on site</a>' ]]</div>
                </div>

I get the output I expect.

I'm using the same filenames in the test weblog with the following lines in _sub_fullentry.html:
Code: Select all
        <div class="datum"><span class="label">entries</span>: <span class="previous">[[ previousentry text='<a href="%link%">older</a>' ]]</span> / <span class="next">[[ nextentry text='<a href="%link%">newer</a>' ]]</span></div>

I get something wrong. The latest entry ID on my blog is 712. No matter what entry I look at, I get a link to entry 711 for "older" and nothing for "newer," even when looking at entry 711. I'm comparing things left and right from one entrypage_template.html and _sub_fullentry.html, and I cannot find a reason why this is happening.

regular: http://geoffrey.famwagner.com/
test: http://geoffrey.famwagner.com/?w=atlantis-test
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Tue Feb 11, 2014 12:52 pm

It dawned on me overnight (you know, doing my best thinking at 3am) that for every entry, these tags are acting as if it's entry 712. As for why, I'm not sure, but I'm looking at module_smarty to see if I see something.
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Tue Feb 11, 2014 2:59 pm

I added a new entry, and now I'm getting the "older" link pointing to entry id 712 and no "newer" link. This seems to confirm to me that these tags and their functions are treating every entry as id 713, the newest entry.
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Harm10 » Tue Feb 11, 2014 4:34 pm

Did you check the allocation of the categories to the active subweblog? There should be a subweblog active to find the right newer and older entries.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Tue Feb 11, 2014 4:53 pm

I went back to the back end to look at it again, selected the same 7 categories again, and I get the same result. I even selected only one category; same thing. I used the parameter category in the tags and get the same result.

If you're referring to the [[ subweblog ]] tag, that goes in the front page template, right, not the entry template?
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Harm10 » Tue Feb 11, 2014 6:00 pm

Yes I am referring to the subweblog tag from which you select the entry from.

One more important question: do you use flat file or MySQL? And of course what version?
If you use flat file you could try to rebuild the indexes.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby hansfn » Tue Feb 11, 2014 6:06 pm

This is interesting. I would try to rebuild the index first. If that doesn't help, I can help - if I get PivotX access and FTP access (if necessary). Debugging through the forum is too slow.

PS! I noticed the very long loading times (as you posted). Does your site use MySQL or a flatfile database? Just curious.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Tue Feb 11, 2014 11:55 pm

I'm using 2.3.8 (updated from 2.3.3 a couple of days ago, it was happening in that one, too). I am using flat files as well, which I'm aware will impact load times, though it wasn't this bad until the 7th, like I mention in the last entry. I've been using Pivot since version 1.something, and just updated every now and again. On a side note, can I (still) convert from flat to sql?

I'm rebuilding indices now. I'll see how that goes.

Am I supposed to put [[ subweblog ]] in the entry template, too? I haven't in any template I've used before.
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby hansfn » Wed Feb 12, 2014 12:12 am

Yes, you can always switch to MySQL from flatfile, but not back again.

No, normally you don't need a subweblog block inside the entry template, but it shouldn't break things. Can you send me your templates to hansfn@pivotx.net Debugging through the forum is just too slow.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: [[ previousentry ]] / [[ nextentry ]] not working

Postby Stingray » Wed Feb 12, 2014 5:40 pm

Templates have been emailed.

I've tried a [[ subweblog ]][[ literal ]] block, [[ subweblog ]] block, and [[ literal ]] block. The first nearly gets there (two links, but to the wrong entries), but I get 10 entries on the page, like the frontpage template (maybe I should use a different name), and it breaks the texttile block for commenting. Just [[ subweblog ]] doesn't work at all, but creates 10 entries and breaks texttile. [[ literal ]] doesn't work at all; out put is just the [[ include ]] line for _sub_fullentry.html.
Stingray
 
Posts: 107
Joined: Wed Oct 28, 2009 2:40 pm

Next

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 5 guests

cron