Support › MB Relationships › Notice: Undefined index: to in normalizer.php on line 84Resolved
I got this PHP Notice error while using MB Relationship together with FacetWP.
With FacetWP activated the normalize() method is getting called twice, resulting in this issue.
On line 79 $direction is set from the $args['from']:
$direction = isset( $args['from'] ) ? 'from' : 'to';
Which is then used on line 84:
$args['items'] = $this->get_ids( $args[ $direction ], $args['id_field'] );
On line 87 the original parameter is cleared:
unset( $args[ $direction ] );
Then the second time around the original 'from' parameter does not exist anymore and the notice is triggered.
Perhaps the normalize_args() method could check if it has already run?
Thank you for your feedback.
Can you please let me know which version of Facet and MB Relationships you are using? And how can I reproduce the issue?
Thanks for your reply.
MB Relationship: 1.10.5
How to reproduce:
This in combination should likely have MB relationship and FacetWP touch the query and trigger the parse_query() twice, which then results in the error.
Let me know if you need anything else.
Thank you for the additional information.
I will inform the development team to check this case and get back to you if there is any information.
Thanks for sending the information to the development team.
I'm getting the same issue.
Metabox AIO 1.13.5