-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
wrong links to news detail (view) #4172
Comments
@Jimmi08 Are you aware of the RSS URL format being used anywhere else in e107? |
No idea. Maybe in some of my plugins, but the format is the same, and the RSS version is correct. |
@Jimmi08 Actually, the sef example was wrong and the RSS format was incorrect. |
@CaMer0n Why did you (generally) do this change? And when? |
Admin view is the next example where is the category missing in URL... You can delete category without checking if news exists... e107 has already problems with double content, now it is worse. |
e_gsitemap generates links without category too |
@Jimmi08: The change in behavior from your second screenshot to your third screenshot was made in 74a3735. See
I was not able to find a change that turned your first screenshot into your second screenshot. On |
@Deltik I know, this was the latest change when I noticed that and it was fix for RSS plugin. But sometimes before was added the category to SEF-URL version. I checked that core/news/sef_url.php wasn't changed, it looks like category_sef wasn't sent before, so it probably hit another route. When I did my canonical plugin, I really checked this and I would notice something like this. Nevermind, at least I had to look at how this works and I was able to change it to my liking. I don't have a problem with the category in URL, I have a problem with that next slash. And that you (generally) did change again in just part of the system, not everywhere. But again, I have it fixed now, all canonical URLs I have generated correct way now and if I update core and I forget to change this file again, it would not be the problem, because canonical URLs are now correct. So it is good that this happened. |
@Jimmi08 I didn't change the underlying processing of the URL. I simply updated the example URL (which is hard-coded) and did not match the reality of what the URL profile generates. As you saw, the file has barely changed since 2016:
Indeed, it is, so we removed the inconsistency. Another solution is to create a new 'news' URL profile which does NOT have the category included. If you want to do that, I'll be happy to add it to the core for you. |
@Jimmi08 If you find other instances of the category-sef missing, please leave a message about it here. Thanks. |
@CaMer0n I know that you didn't change anything now. That this was just fixing. It is ok. When you don't send category_sef to url(), it will display that old way. So sometimes ago something changed in news data. The problem is not in a category (it is good in fact), the problem is in that slash. And missing mandatory slash at end of URL. My fix is: - changed slash to underscore.
|
Bug Description
On my site, I noticed that news URLs are created the weird way in news listing in any news list except rss plugin.
How to Reproduce
My settings:
RSS plugin: (correct)
https://www.e107sk.com/news/view/62/jm-core-1-9-released
News:
https://www.e107sk.com/news/view/62/plugins/jm-core-1-9-released
there is the category added to URL.
News template uses:
<h3 class="post-title">{NEWS_TITLE: link=1}</h3>
and
<a href="{NEWSURL}" class="pull-right">' . LAN_READ_MORE . ' »</a>
both shortcodes return wrong URL.
RSS plugin uses:
$rss[$i]['link'] = e107::getUrl()->create('news/view/item', $value, 'full=1');
And
news shortcodes
e107::getUrl()->create('news/view/item', $this->news_item);
RSS works because it doesn't have category_sef in $value.
It means that e107::getUrl() ignores URL configuration.
PHP 7.2
latest git version for testing, the live site is older.
Thanks
The text was updated successfully, but these errors were encountered: