I am working with Umbraco 7.5.2 and I am trying to set a custom 404 page.
I am hosting 2 totally different sites on the same Umbraco.
I've created my page types and pages in the back office and in umbracoSettings.config I have added this:
<errors>
<error404>//errorListFolder/page[#nodeName = '404']</error404>
Which will find the page with name 404 from type page right below errorListFolder.
But this page is the same for both of my sites (shows the one on the first site). How can I fix it to show the relevant error page on each site?
I have tried
<error404>$site//errorListFolder/page [#nodeName='404']</error404>
But it doesn't find anything and I will end up with the basic error page of umbraco
And this is my structure (I removed the other nodes for simplicity)
Comment
Thanks to Marcin, I could fix it with Nibble.Umbraco.PageNotFoundManager. It is a wonderful tool! but I need to mention that you have to set umbracoSettings.config manually back to normal, otherwise it won't work.
I had the xpath in that file and no matter what I select in the back office, I couldn't see my page. then I change that back to 1 and it is working like a charm :)
You can access specific trees by going from $root element. Check my solution from one of our projects:
<error404>
<errorPage culture="pl-PL">$root/homePage[#nodeName='PL']/hTMLContentPage[#nodeName='content not found TERROR - 808']</errorPage>
<errorPage culture="en-US">$root/homePage[#nodeName='EN']/hTMLContentPage[#nodeName='content not found TERROR - 808']</errorPage>
<errorPage culture="default">$root/homePage[#nodeName='PL']/hTMLContentPage[#nodeName='content not found TERROR - 808']</errorPage>
</error404>
It takes first node with original name 'content not found TERROR - 808' from node of type 'homePage' and specific nodeName as you can see above.
For your scenario, you should try Umbraco Page Not Found Manager made by Tim Geyssens: https://our.umbraco.org/projects/backoffice-extensions/umbraco-page-not-found-manager/ (uHangout: https://www.youtube.com/watch?v=bFL0xUhRerI). Probably it's something what you're looking for. It may be hard or even impossible to arrange it with basic error404 settings in config file, especially if you want to keep some culture depending 404's underneeth previously accesed tree nodes.
Hope that it help you!
Related
I am trying to export an existing php-based dynamic webpage into a lektor project which up to now really worked well.
Unfortunately one problem is giving me a headache:
While my navigation works perfectly with every page and subpage, links to subpages in the content section don't.
E.g. if I set a relative path like
[My Link to Subpage](/peter/personalinfo)
it is correctly shown in the browser view. If I hover the mouse over the link the browser shows the correct url 127.0.0.1:5000/peter/personalinfo.
But if I click it I get
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
and the url in the address field shows
127.0.0.1:5000/peter/peter/personalinfo
So I click the correct url but the browser calls the wrong url and of course can't find anything there.
I don't understand how this doubling can happen. I naively would expect that if I clicked a link the browser would exactly look at that address. But it seems like the server is redirecting to the malformed url. And yes, it does so with any link to a subpage.
the navigation looks like this:
Home
News
Peter
-- Personalinfo
-- Contact
-- Portfolio
Bob
-- Personalinfo
-- Contact
-- Portfolio
Any idea why this happens and how to change it?
Update: The problem doesn't appear with the built static page on a webserver.
there is an open issue (#997) that is already fixed and will be released soon. But you can fix this yourself, just append a slash at the end of your link [My Link to Subpage](/peter/personalinfo/)
This is my first attempt at using Magento to develop a site. I have to admit the learning curve has been steep, but i have been able to navigate most of the challenges thus far. Here at the final hurdle, however, i have stumbled.
Specs:
Magento 1.7.0.2
Apache version 2.2.22
PHP version 5.3.10
MySQL version 5.1.65-cll
Magento is located in a folder on the server named magento one directory down, as in http://www.mydomain.co.za/magento
Problem:
No images are displayed in the front end or backend. It is as if it cannot access the stylesheets. When viewing the source, i can see that the paths are wrong. It searches for the stylesheets in http://www.mydomain.co.za/ and not in the magento folder. I can access the backend by typing in http://www.mydomain.co.za/magento/index.php/admin and that brings up the backend without any styling. After that however, every request results in 404. The URL looks like http://www.mydomain.co.za/magento/adminindex.php without a slash between admin and index. Introducing that slash manually after every 404 results in correct page being displayed (still without styling). So clearly the problem is here, but i can't seem to fix it. And YES, i do have the slash after the path in the database for both secure and unsecure.
Attempts to solve:
Changed the url’s in database link
Changed app/etc/local.xml to use correct database
Changed .htaccess to include this line: RewriteBase /magento/ (but i
removed it again)
Deleted the appropriate cache and sessions folders
Tried some of the suggestion given here link
Now, i am stuck. I have worked my way through error upon error (no fault of Magento, just the learning curve) and i am tired… :-( If someone can please give me some advice as to what to try next, it would be greatly appreciated.
I found these links of the (seemingly) similar problem. Clearly there is something happening here. The other thread never solved the issued, just found a work around. Is it possible that we have run into a bug? Something is stripping that slash out and it isn’t any of the usual suspects… dum dum dum
link
link
I have been on this issue for almost a week now and have been research all over the net for answers but i could not find one.
Problem:
each time i access the homepage of my site, it results to a 404 error.
ex.
http://www.domain.com ---> redirects to 404
http://www.domain.com/home ---> enters to the cms page that i set as my homepage
I have already run the magento cleanup scripts but it was not able to solve the problem.
ERROR MESSAGE:
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Store.
Go back to the previous page.
Use the search bar at the top of the page to search for your products.
Follow these links to get you back on track!
Store Home | My Account
I've got a similar error and would like to post my solution here. The case was exactly the same for me: all the pages, categories, etc. worked perfectly, but the home page showed a 404 error.
I looked into the core_url_rewrite table and discover that there was an entry with the «request_path» field empty. So this entry was rewriting my base url and that was the reason for the 404 in my case. I just deleted it.
Hope this helps to other people.
If you are using the Enterprise version you should check the table enterprise_url_rewrite. The query below should help you:
select * from enterprise_url_rewrite where request_path="";
delete from enterprise_url_rewrite where request_path="";
Check the folowing:
1- System->Configuration->general->Web->secure
Base URL: http://www.your-site.com/
(be sure you are in the right shop site from the top left of the system)
2- System->Configuration->general->Web->Default Pages
Default Web URL: cms (yes just cms)
CMS Home Page: select your cms page
Default No-route URL: cms/index/noRoute
3- check your server has rewrites otherwise
System->Configuration->general->Web->Search Engines Optimization
Use Web Server Rewrites: No
4- something wrong with your .htaccess replace the file with the one in your original installer.
Because StackOveflow has this stupid rule that I must have a certain number of "points" before I can chime in on discussions I need to make this as a "new answer":
open-ecommerce.org's #2 also solved the problem for me
2- System->Configuration->general->Web->Default Pages Default Web URL:
cms (yes just cms) CMS Home Page: select your cms page Default
No-route URL: cms/index/noRoute
for me this was set to "index". No clue how it worked before, or why it was set that way, but after updating it broke and this was the fix for me.
Note that I did also truncate the 'core_url_rewrite' table as well in troubleshooting. If you don't change urls at all, or often, then that's no big deal. But if you are chaning URLs often, then you'll loose your 301 redirect history (all old urls will 404 going forward).
Open-ecommerce.org solution # 2 , worked for me.
I initially set my "Defaul Web URL" as the URL of the homepage. Similar to what I did with the baseURL but I was wrong.
I changed it to "CMS"
From there, it all works.
Thanks!
I have installed full release Magento on localhost from http://www.magentocommerce.com/download. Before doing installation I have created a database and import Magento sample database (downloaded from Magento site).
After that continue installation process. When I checked fronted its shows Best Selling Products when I clicked any of the product it gives error given below:
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
* If you typed the URL directly, please make sure the spelling is correct.
* If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Demo Store.
* Go back to the previous page.
* Use the search bar at the top of the page to search for your products.
* Follow these links to get you back on track!
Store Home
My Account
I am new to Magento.
I've experienced this too. In the admin go to System > Index Management and rebuild the various catalog indexes, especially the URL rewrites.
This is because the sample data doesn't have it's paths stored to begin with, it needs to be calculated, and the Best Selling Products section doesn't read the actual paths in use, instead it is a Static CMS Block with it's HREFs fixed. This will probably never occur for products you enter yourself so it's nothing to worry about.
I had the same problem in Wamp. I had my folder named Magento, renaming it to magento, fixed the problem. (Lower case)
I had a similar issue, I was transferring Magento from a Unix server to a Windows server. My issue was to do with links looking like this (not working)
http://www.magentoshop.com.au/shop/product01.html
instead of
http://www.magentoshop.com.au/shop/index.php/product01.html
Haven't worked out how to fix all links yet, but just adding it tells me where the issue lies. Hope it helps someone else.
i m facing problem to open a new article in joomla, when i click on link following error display on the page
Homepage is showing:
404 - Component not found
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages:
Link of the page is: http://punjabtourism.gov.in/index.php?option=com_content&view=article&id=86&Itemid=71
when we click BOQ the last link of the site next page will show the above error if anybody have solution please help me.
It is probably your setting in 'GLobal Configuration' in the first menu in the backend. Go to Search Engine Friendly URL's, check if its on. Check if 'mod-rewrite' is on. If these have been enabled after you created an article, then your links wont work. You need to add the article after enabling these settings to make it work properly.
Your best bet is to re-publish all your articles, the links should work fine then.
Hope this helps.