CMS Made Simple™ 1.11.13 “Baquerizo Moreno”
Yes I know this is a slightly out of date version of the CMS, and is not currently supported, but I have a slightly odd query that shouldn't matter regarding the version itself.
On this website:http://www.met.uk.com
If I visit this page for instance which is a news page: http://www.met.uk.com/New-Equipment-for ... esting.php
The PDF links work perfectly as you'd expect (with this link http://www.met.uk.com/uploads/images/pd ... ckages.pdf), but... If I search in the top search box with the title of the news article "New Equipment for Vacuum Decay Testing", I get an issue once I navigate through the search results to effectively the same page.
This is the result I get after the search: http://www.met.uk.com/news/263 which would be fine, except you'll notice the PDFs now produce a 404 error, this is because of /news/ being added into the URL i.e. http://www.met.uk.com/news/uploads/imag ... ckages.pdf
If anyone can shed any light on this for me I'd be grateful, I'm sure it's a really simple fix.
After Search Links In News Results Are Broken
-
govicinity
- Forum Members

- Posts: 125
- Joined: Tue Nov 22, 2011 2:22 pm
After Search Links In News Results Are Broken
Going up, woop, woop.
Re: After Search Links In News Results Are Broken
Try: Content > News > Options tab. Check if "Default page to use for detail views" has been set to a page, if not then set one. That might sort it.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
-
govicinity
- Forum Members

- Posts: 125
- Joined: Tue Nov 22, 2011 2:22 pm
Re: After Search Links In News Results Are Broken
Hi Paul, yes that's all been setup for quite a while that way on this site, really odd, it only happens when you search for the page (using the page title in the search box etc) and then visit it through the search results, suddenly it seems to use hierarchy for the news article i.e. /news/ wheras getting to the news article the normal way does not, so it's looking for the PDF in:
/news/uploads/
not
/uploads/
where it should be thus breaking the file path.
/news/uploads/
not
/uploads/
where it should be thus breaking the file path.
Going up, woop, woop.
Re: After Search Links In News Results Are Broken
You might be able to solve the problem by including a
in the <head> section of your PAGE template(s).
When using the {metadata} tag this base tag comes by default (unless explicitly disabled by an extra parameter)
Code: Select all
<base href="{root_url}/" />When using the {metadata} tag this base tag comes by default (unless explicitly disabled by an extra parameter)
-
govicinity
- Forum Members

- Posts: 125
- Joined: Tue Nov 22, 2011 2:22 pm
Re: After Search Links In News Results Are Broken
Hi Velden, thanks for taking the time to reply, I popped that in, but to no avail, it for some reason still puts the /news/ in which still breaks the path to the uploads with the PDFs in it when you navigate to the news story through the search facility, the URLs stay the same as in the original post. Stumped me this one.
Going up, woop, woop.
Re: After Search Links In News Results Are Broken
There seems to be no '/news/ ' in the href of the specific links.govicinity wrote:Hi Velden, thanks for taking the time to reply, I popped that in, but to no avail, it for some reason still puts the /news/ in which still breaks the path to the uploads with the PDFs in it when you navigate to the news story through the search facility, the URLs stay the same as in the original post. Stumped me this one.
Code: Select all
<p>Details of a variety of seal testing methods are given in our '<a title="Test Sealed Packages" href="uploads/images/pdfs/Test-Sealed-Packages.pdf">How to leak test sealed packages</a>' guide and our ‘<a title="Medical Device Leak Test Guide" href="uploads/images/pdfs/medical-device-leak-test-guide.pdf">Medical device leak test guide</a>’I'm pretty sure the base tech will solve this issue.
-
govicinity
- Forum Members

- Posts: 125
- Joined: Tue Nov 22, 2011 2:22 pm
[SOLVED] Re: After Search Links In News Results Are Broken
Velden you are a star, you are of course correct, The news and search used a different template I needed to add the base url to, I forgot I had two other templates seperate to the ones that used the meta tags in the global settings, bob on thanks, much appreciated.
Going up, woop, woop.

