Closed mbabker closed 6 years ago
See #15868 for the first two - I couldnt replicate/find the last one
This might not something you can sort out. I did another crawl to try and get the source creating that link and found this...
yeah i tested the archive sample and it seemed ok
Found the link:
<base href="http://localhost/joomla-cms/index.php/archived-articles/2011" />
on this page:
http://localhost/joomla-cms/index.php/archived-articles/2011?view=archive&month=1
But can you find it in the dB to fix?
I don't think so. I assume the base
tag is dynamically being generated.
It is missing the query portion ?view=archive&month=1
that is causing the issue.
So to me then we've got a routing bug somewhere as a URL should be valid when SEF is enabled with no query strings attached.
On Mon, May 15, 2017 at 5:53 PM Quy notifications@github.com wrote:
It is missing the query portion ?view=archive&month=1 that is causing the issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joomla/joomla-cms/issues/15863#issuecomment-301627656, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWfobeH33DKVDwgFelqnid_8eC8FbJeks5r6Nd4gaJpZM4NS-KN .
--
- Michael Please pardon any errors, this message was sent from my iPhone.
This link is generated:
http://localhost/joomla-cms/index.php/archived-articles/2011?view=archive&month=1
when it should be:
http://localhost/joomla-cms/index.php/archived-articles?view=archive&month=1&year=2011
I will try to track down where this URL is generated.
In \components\com_content\helpers\legacyrouter.php
, the following was changed from:
if ($view == 'archive')
{
if (!$menuItemGiven)
{
$segments[] = $view;
unset($query['view']);
}
if (isset($query['year']))
{
if ($menuItemGiven)
{
$segments[] = $query['year'];
unset($query['year']);
}
}
if (isset($query['year']) && isset($query['month']))
{
if ($menuItemGiven)
{
$segments[] = $query['month'];
unset($query['month']);
}
}
}
to make it work:
if ($view == 'archive')
{
if (!$menuItemGiven)
{
$segments[] = $view;
}
unset($query['view']);
}
I don't know if this is the right solution. If no, then I am out of ideas.
@quy could you make a PR for this
@brianteeman I am out until Monday when I can do it then.
gently Reminder @Quy
Related to #13757. Please close this one. Thanks.
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/15863
closed as stated above.
Got other stuff going on so no time to do PRs myself, but...
github.com/joomla
(looks like the protocol is missing in the URL as Screaming Frog gives me a link ofhttp://jcms/github.com/joomla
when I crawl my local install)welcome.html
linkarchived-articles/2011
gives a 404 (butarchived-articles
is good)