I can report that I fixed my reroute script in such a way that the notices do no longer appear!
If you see the solution you would think that is obvious…… but most of the times fixes are like that!
Anyway I explained that I have a 404 reroute script in place. As some of my clients previously had either another CMS or used different permalinks getting a 404 does not have to mean that the content is not there.
For tags I also do a reroute if some 404 URL comes in that has tag in it.
I clean the URL, change the headers and the query and remove the 404 status.
The page with the new tag appears fine.
But Yoast gives these notices.
My first approach of trying to find why this happens within your script became harder and harder (also because I do not know your software that well).
So I began capturing query structure for a normal tag page and started comparing it to the query I reroute with.
There were small differences (which I also corrected) but one major one: the error situation. If you look at the notice it mentions WP_Error which should have pointed me in this way from the beginning!
I forgot to code this for the tag part in my script:
unset( $query->query_vars['error'] );
unset( $query->query['error'] );
and that did the trick!
I think the report can be resolved now………… ??
-
This reply was modified 4 years, 3 months ago by Harm10.