• Resolved jwarnox

    (@jwarnox)


    I am using the Location Relative Hierarchy rule set for checking a page is the childOf a parent page and it was not working, so I took a look at the source code and noticed it was checking strict equality (===) between $parent_id (int) and $relative_id (array) hence why it is breaking, so by changing:

    $relative_id = $rule['value'];

    to

    $relative_id = $rule['value'][0];

    made the code pass true for me as I am assigning the int from the array not the array to variable $relative_id.

    Can this be fixed please?

    Thanks,
    Jamie

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi @jwarnox,

    I just replied to your other post, but you are correct. That said, this field should not allow multi-select, only a single selection. So the code you are referring to is actually as intended. It’s just that an array is currently being saved for $rule['value'] instead of a single value.

    I should have a fix out later this week and will follow up once a new version is available.

    Best,
    Nick

    Plugin Author Nick Diego

    (@ndiego)

    Just checking back in. This issue should be fixed with the latest release, version 3.0.4. Thanks again for reporting this!

    Best,
    Nick

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BUG: Location relative hierarchy equality check’ is closed to new replies.