XF 2.3 Strange incident: Enabling a route filter caused 404 errors somewhere else – Problem with XF caching?

nocte

Well-known member
I begin with a short summary of the incident:

Recently I activated a route filter for the new “Knowledge Base System” add-on by @Bob. Then I got some user reports, that reactions in DMs don’t work: trying to react gave a 404 error. After I deactivated the route filter, the problem was immediately gone. This is proven by the server logs (we checked the 404 errors).

Now, the interesting part: Re-activating the route filter did not re-trigger any 404 errors. I am simply not able to replicate the issues.

I assume, that some kind of XF-cache was ruined and deactivating the route filter rebuilt/repaired it.

Any ideas what this can be, where to look exactly or how to replicate this?



More details:

My setup has 2 route filters for DMs. Something like

conversations/ -> private-messages/
direct-messages/ -> private messages/

The route filters for Bob’s add-on were something like:

xa-kbs/ -> faq/
xa-kbs/categories/ -> faq/areas/

The routes, that caused 404 errors began with a pattern like:

private-messages/replies/1234/ (1234 is an example reply ID)

So, this affected direct links to specific DM replies and actions like reacting:

private-messages/replies/1234/react?reaction_id=1

I assumed that something in the xf_data_registry table was wrong, but analyzing the binaries showed, that the values were written correctly, both, on enabling and on disabling the route filters.

I also looked at the add-on by Bob: It does not contain “replies” a single time.

So, that’s what happened. Has anyone an idea, how this strange behavior may have been triggered?
 
At first I thought this might be an issue with unstable sort order when caching route filters. They are ordered by length of the replacement, but in this case both replacement values are the same, meaning the last one in the set wins. However, when stabilizing the sort order in either direction, I still wasn't able to reproduce this. In any case, I think conversations/ filter should be unnecessary, because in nearly all cases it they redirect to the canonical direct-messages/ route (and hence the private-messages/ filter) out of the box.
 
Back
Top Bottom