The canonical URL for categories is broken. It shows the same canonical URL: http://forum.example.com/categories or http://example.com/forum/categories — for all categories!
Besides that page doesn't exist — it gives a 404 error.
Is this a bug? How can this be fixed? Hope someone can chip in. Thanks.
@Todd ?
This is a bug that has been fixed in our dev branch. I'll get it back ported to the 2.0.18 branch.
luc
✭✭
Might be this one:
Fixed canonical url in /categories/*. https://github.com/vanillaforums/Garden/commit/c9d97264f060f246c411c649f71fa512af136516
Excellent find. I cherry-picked that commit into the 2.0.18 branch.
luc
✭✭
Not sure.
I might just do it soon for myself, but that's just a forum for me and my wife. But that's not something that anybody could recommend.
I guess, it does work most of the time as vf.org is running at least most of it.
2.1 has a lot of changes and we have a lot of backwards-compatibility with theming right now. If you don't know what you are doing then don't go unstable.
With regards to the canonical url thing. I may take out that if statement since it can't hurt, but for now don't worry about the canonical url not being there. The purpose of the canonical url is to remove ambiguity between two of the same page on different urls.
Answers
DUDE! You only posted this question a couple of hours ago and now you want already attention from a specific person?
Let your question live in the discussion list for a while! After you haven't gotten any response for a couple of days, THEN ask a specific person.
And the first response for you is (abacadabra):
Learn how to SEARCH in the forums!
(then also search for forum etiquette, there's a whole thread about it)
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- 1Abuse
0 · Insightful 1Awesome LOL ·@UnderDog :
Calm down.
First I searched. I couldn't find any solution.
I posted my question. As always, I started searching for a solution again.
So, as it should have been obvious by now, your analysis is pure bullsh!t. So stop judging and try to help. This is a community. You are a moderator, and that doesn't mean... well, you should have realized it by now.
And if you actually know that 'there's a whole thread about it', as a moderator didn't you have the minimum courtesy to share the link? Damn, you have made my day!
One suggestion: maintain a friendly tone with others. Ones asking a question here need help, not your silly judgements. :)
- Spam
- Abuse
2 · Insightful 2Awesome LOL ·I second @badlearner 's opinion.
- Spam
- Abuse
2 · Insightful 2Awesome LOL ·@Todd : If there's a file (on GitHub) that I can refer to for changes, it would be very helpful. I will gladly post the fix here for everyone.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Thanks Todd and Luc!
- Spam
- Abuse
0 · Insightful Awesome LOL ·And as an fyi @badlearner, Any canonical urls that are specifically overridden will always be in the controllers with a call to
$this->CanonicalUrl(...).- Spam
- Abuse
0 · Insightful Awesome LOL ·Yes, got it. Thank you.
- Spam
- Abuse
0 · Insightful Awesome LOL ·@Todd : Did you push the entire file or just that line? Here's the thing:
Using the entire file causes this error on Vanilla 2.0.18.3:
In another scenario...
Adding this line (replacing the existing one):
And removing this:
Completely removes the canonical meta tag from the source. So, in a way, there's no fix yet (unless I am doing something seriously wrong). Thought I should let you know.
EDIT: Using the file you just pushed on GitHub gives an error (see above).
- Spam
- Abuse
0 · Insightful Awesome LOL ·@badlearner, have you had any success this is the same problem I have.
Is this pretty much the solution.
`Adding this line (replacing the existing one):
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
0 · Insightful Awesome LOL ·@peregrine : As you can see I have pinged @Todd about it, and he hasn't replied yet. And no adding that line alone doesn't seem to fix anything.
I believe that the changes made in that file (/vanilla-root/applications/vanilla/controllers/class.categoriescontroller.php) are streamlined to work with Vanilla 2.1*, and apparently, not Vanilla's current stable v2.0.18.3. :(
So, yeah I am waiting for a fix too.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Did you remove the second call to Canonical Url? I tested and pushed that very fix in the 2.0.18 branch.
- Spam
- Abuse
0 · Insightful Awesome LOL ·@Todd : Oh yes, I did. Please see this comment of mine, you'll see exactly what I did.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Okay I think I know what's happening here. When the canonical url matches the current url then it doesn't show up. Canonical urls only show up when there's a difference.
- Spam
- Abuse
0 · Insightful Awesome LOL ·But canonical URLs are supposed to show up in the source of every page right?
In a similar instance, Lincoln said that the issue of breadcrumbs not showing up in a theme has been fixed in v2.1. He also referred me to a file. But when I made the changes on my Vanilla v2.0.18.3 forum, breadcrumbs weren't still showing up.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Todd just told you if the canonical is the same as the url it's served from, it doesn't show up.
This one was tested. Otherwise, you can expect any changes from the upcoming 2.1 to be work, some are linked to other changes in the code too.
- Spam
- Abuse
0 · Insightful Awesome LOL ·@luc : One last question - - do you think it's a good idea to start my public-facing forum using the unstable master version? I am willing to update my theme everyday with the latest changes.
The thing is, Vanilla 2.0.18.3 has too many issues (at least for me) to use it. Just looking for some advise here.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Thanks luc!
- Spam
- Abuse
0 · Insightful Awesome LOL ·Okay, got it. Thanks Todd!
- Spam
- Abuse
0 · Insightful Awesome LOL ·