fix duplicate next/prev in blog post

Permalink Browser Info Environment
I updated my ProBlog after I updated to 5.4.1 and started seeing duplicate next/previous links in blog posts.

The problem stemmed from the tony_next_previous block being included in the new concrete core as next_previous.

To fix this I copied
/packages/problog/controllers/dashboard/problog/add_blog/controller.php
to
/controllers/dashboard/problog/add_blog/controller.php

and changed this line (around 169 in the saveData function):
if($b->getBlockTypeHandle()=='content' || $b->getBlockTypeHandle()=='next_previous'){

to
if($b->getBlockTypeHandle()=='content' || $b->getBlockTypeHandle()=='next_previous' || $b->getBlockTypeHandle()=='tony_next_previous'){


This will check for both next_previous (the new block handle) and tony_next_previous (the old block handle) and delete either one.

To keep my styling hooks the same I also changed the handle 'next_previous' to 'tony_next_previous' around line 230, where the next/previous block gets added back to the blog post.

Hope that helps someone!

Type: Discussion
Status: New
kirkroberts
View Replies:
RadiantWeb replied on at Permalink Reply
RadiantWeb
confirmed. Although I will not be adding this to the main install as there are only a few people that will be affected by this issue as checking for Tony's nex/prev was only released for a short time.

Chad
RadiantWeb replied on at Permalink Reply
RadiantWeb
also, for future reference, could you please post these as bugs in the support area instead of discussion? Other users will check there first most likely when wondering if anyone else has had the same issue.

don't bother with these though :-P

C
kirkroberts replied on at Permalink Reply
kirkroberts
If they don't look here they're not desperate enough :-)

Sure, I'll post in Support instead.

Thanks!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.