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):
to
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!
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 |
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
don't bother with these though :-P
C
If they don't look here they're not desperate enough :-)
Sure, I'll post in Support instead.
Thanks!
Sure, I'll post in Support instead.
Thanks!
Chad