-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Articulate v5: Can filter articles by category or tag #439
Comments
Steps to replicate please. What version are you using? You can see this is working on my site fine https://shazwazza.com/categories, https://shazwazza.com/tags |
Just visiting the url /blog/tags/ or /blog/categories/ trigger the error |
@khraibani is your articulate instance an upgrade from a previous version? We see exactly the same issue/error on a site upgraded from v7 to v10 - we have disabled the category and tag routes on this instance till we resolve the issue. (We added IIS Rewrite rules to redirect /tags and /categories back to blog root short term). Initial thoughts this may be data/migration related, not had a window to debug and dig further yet, but will try and find some time this week and will update thread with findings. |
@gavinfaux no It was a clean install on v12. |
Are you using the latest articulate? 5.0.1 https://www.nuget.org/packages/Articulate/5.0.1 My site is running on umbraco cloud with version 12.3.6 |
I get the exact same error as @khraibani . My current setup is: Umbraco 13.0.3, Articulate 5.0.0, two root nodes with their own domain (one is the Articulate node, the other the rest of my website). I tried to use Articulate 5.0.1, but I got the 404 errors on my website nodes like mentioned in issue #432. So I reverted to 5.0.0 which works without these 404 errors. It is an upgrade from Umbraco 8.18 and Articulate 4.3.2. |
@Shazwazza Umbraco version 12.3.6 Articulate 5.0, I have tried updating to 5.0.1 but I got the 404 errors mentioned in #432 |
@Shazwazza @gavinfaux Because Umbraco is throwing and handling a 404 before Articulate steps in, the condition on this line in the ArticulateRouteValueTransformer will always be true, and Articulate will not process the route (/tags or /categories) any further. After I removed my Custom404 setting, the tag and categorie pages were displayed normally again. As my knowledge of the code of Articulate is -still- very minimal, I don't think I will be able to solve this (soon). |
@wvdweerd @Shazwazza I'm seeing similar locally, due to the previous PR #436 which changed route priority, it's now too high and being skipped allowing not found handlers to kick in. Will try and figure out current route priorities and ensure correct order... |
I guess some of these issues depend on how site is setup, in our case we've replaced the default controller on startup and use route hijacking, likely we have overlooked something with our implementation.
I don't think #436 breaks anything and will continue to research options/workarounds. |
NullReference exception resolved by #440 404 is still issue if you have you have custom content finders, e,g. Custom404 or SetContentLastChanceFinder, still looking into solutions |
Even if that line was removed, if you've set a custom 404 the ShouldCheck method causes the umbracoRouteValues to be resolved by Umbraco content finders to your 404 content rather than articulate resolving, I think the Umbraco pipeline resolves it before that even. None of the routes defined in |
As a workaround a last chance content finder can be coded to exclude the articulate routes, which will then fall through to the articulate router to handle (pseudo code): public Task<bool> TryFindContent(IPublishedRequestBuilder contentRequest)
//** ......trimmed........**
var articulatePaths = new List<string>
{
articulatePath + "opensearch",
articulatePath + "rsd",
articulatePath + "metaweblog",
articulatePath + "wlwmanifest",
articulatePath + "rss",
articulatePath + "author",
articulatePath + "a-new",
articulatePath + searchUrlName,
articulatePath + categoriesUrlName,
articulatePath + tagsUrlName
};
if (articulatePaths.Contains(path)) return Task.FromResult(false);
//** otherwise set your 404 / not found content**
} |
@nvisage-gf Looks like a viable workaround, I will try this tomorrow or this weekend in my website. And a curious noob question: |
Posting example IContentLastChanceFinder implementation that we are using, obviously do your own testing and modify as needed (e.g. I don't believe this can be achieved with just an IContentFinder since we need to ignore these custom routes, not match them, so they get resolved by the Articulate router which sets the appropriate content.
|
Many thanks @nvisage-gf for this elaborate code snippet. |
I am getting the following error when try to filter posts by tag or category, I get the same internal server error
/blog/tags/ or /blog/categories/
The text was updated successfully, but these errors were encountered: