if PrevNextApi->add(), $prev_nid and $next_nid should be 0 if $prevnext_bundle->get('include') is false.

CommentFileSizeAuthor
#5 check-include-2826145.patch634 bytesshuiiz

Comments

GaëlG created an issue. See original summary.

josephleon’s picture

Taking a dive into this.

josephleon’s picture

Could you please include steps to reproduce the exact error you are getting with as much detail as possible?

gaëlg’s picture

I have two node types: pages and definitions. I want prev/next links on definitions, but not on pages. In admin/config/system/prev-next, I check "Include" for definitions, and not for pages. I add a prev/next block to the content region. I create pages. I get prev/next links on it, which is wrong.

(Actually I use a patched version of the module, from #2822938: Only nodes in the same term, but I'm pretty sure the bug exists in the unpatched version because there is no call to $bundle->get('include'), so the code never checks if the checkbox is checked or not)

shuiiz’s picture

StatusFileSize
new634 bytes

I have made a simple patch to check if "include" is checked before indexing the item.

jcnventura’s picture

Status: Needs work » Needs review
nicxvan’s picture

I actually addressed this in my drush merge request since I needed that there as well.

https://www.drupal.org/project/prev_next/issues/3333959