After updating to rc1, block inject doesn't respect paragraph conditions anymore or doesn't respect them properly.
E. g. if I enter "The destination needs to have more than 4 paragraphs" it will add block inject region if I have 4 or even 3 paragraphs.
It used to work in previous version, so I'm not sure what's causing the problem.
Comments
Comment #1
upchuk commentedHey there,
Thanks for reporting. I will take a look and see what happens!
Comment #3
upchuk commentedHey there,
I fixed the issue by addressing some problems in the logic of determining the paragraph count in the body. I'm not sure how your exact example was even working before :)
If you get a chance you can try out the dev snapshot to confirm this works.
Thanks for reporting.
Comment #4
1mundus commentedWell, it was a bit random, it usually worked, but on some pages it didn't. After updating to rc1 it stopped working completely.
I'll test it soon and let you know if it works.
Comment #5
1mundus commentedIt seems to work properly now. However, the logic used is "exactly or more than", so you might want to change the wording. E. g. if you enter "more than" 5, it will inject the region if there are 5 paragraphs, although it should inject it only if it's 6 or more of them.
Comment #6
upchuk commentedHey,
The logic is not "exactly or more than" but as it says: either "exactly", "more than" or "less than". You can check it out here:
http://cgit.drupalcode.org/block_inject/tree/block_inject.module?id=dd69...
Comment #7
1mundus commentedSo if you enter 5 and select "more than", it shouldn't display the injected region if there are 5 paragraphs in the node? I don't get this behavior, it will display the region even if there are 5 paragraphs.
Comment #8
upchuk commentedHey,
Yes, that was the bug you reported. That if you entered 5 paragraphs and selected "more than", the action was triggered if the node had 5 paragraphs. Now it should be fixed in the dev branch and only be triggered if there are more than 5. But do keep in mind #2498377: Block inject loading empty content type list: the condition is not for the region to be injected but for the offset action you specify below to take effect.
Cheers!