How to set a 404 error page on wordpress/fishpig for magento - wordpress

I've done a fully integration of a Wordpress in a Magento shop with FishPig, everything is working fine except that I can't find where or how to find/edit/set a custom 404 error page.
It's my first time using Magento and my php knowledge is very limited so any help would be much appreciated.
Btw, That's the default no-route error I get: http://doshaburi.com/blog/category/xx/
Thanks.

This isn't possible via a configuration setting in the extension. What you could do though, is include a .phtml file in your 404 page and then display a different piece of content if the URL starts with the blog route (eg. /blog/.*) to every other request.

Related

Translate press Wordpress plugin Issue

Im trying to use the Wordpress plugin TranslatePress however the French Version of the page https://fr.londonauto.autoverify.com/fr/backend-glitch/ doesn't seam to play well with the page content.
I cant see anything relevant to the issue in the console.
Works without issue in the english version - https://fr.londonauto.autoverify.com/backend-glitch/
Wondering if anyone out there has experience with this plugin that might be able to advise.
It's obvious that in the /fr/ lang you missing to load many-many files. Your total requests are 104 for this page and in the FR you load only 42. It's very strange problem and I think that it has to do with you htaccess file. Can you please describe your server options, like: Cache system, Webserver type, etc? Also post your redirect rules if you have nginx or apache

Gravity Forms file upload leads to 404 in WordPress Admin

I'm current having an issue with Gravity Forms. I have several forms with an upload function, but when people upload a file i can't view it in the backend. It just leads to an 404 error.
The file destination is: /index.php?gf-download=2018%2F10%2FRegnskabsskabelon-International-transport.pdf&form-id=7&field-id=101&hash=923ee8ba8c7bb431ea0c6b60ac4b0b8cd345b1ed452d8b4d3bddf1579ea961bf
I can't seem to find the file in FTP.
I don't know how to troubleshoot this error or find the problem.
What i've tried:
Deactivating all plugins
Resetting permalinks
Using an standard theme
Updating Gravity Forms.
The error still occurs
Hope you can help
Currently on Gravity Forms Version 2.4.6
Best Regards
I was facing this issue with a client and just found a solution. It may not be universal though as most articles I found state that it is most likely a plugin conflict.
In my case it was simply an unwanted redirect of */index.html
There is already a redirect set in htaccess to route index.html to index.php and if there is a secondary redirect of index.html to a given page, you get a 404.
Hope this helps someone, as I haven't found any concrete solutions.
I also just encountered this problem, and after head much scratching discovered that one possible cause is if you have moved Wordpress to/from its own folder but moved the index.php file instead of copying it. Copying index.php back to its original location fixes the 404 error.

Where to find backend of 404 page in Wordpress

I'm trying to find the backend of the 404 page of our site: http://www.australiancriminallawyers.com.au. We are using Wordpress.
I need to trace its backend and look into changing the Google Analytics tracking code. Currently, the tracking code is the same as the code present on all pages which is implemented via the header.php file.
I already looked into the theme files but there is no 404.php file. Where can this 404 error message be originating from?
Further, how do I make it happen so that the 404 page does not make use of the same tracking code present on other valid pages (I need to modify just the tracking code on the 404 page for event tracking)?
An example of a wrong URL that prompts a 404 error message is http://www.australiancriminallawyers.com.au/web.
Not sure if this is what you looking for, But you wan to track pages creates 404 errors with Yoast SEO plugin https://yoast.com/wordpress/plugins/google-analytics/tracking-downloads-error-pages/

WordPress - how to add a custom 500 server error page?

It seems easy to create a custom error page in WordPress for a bad page, i.e., a 404 not found - just create 404.php in the theme directory.
I'd like to do the same for a server error, say if a CGI script on my WordPress site does something stupid like divide by 0.
I tried creating a 500.php page in my theme directory but it appears to be ignored. Instead, the 404.php page in the theme directory is called.
It seems that WordPress somehow catches the server error and translates it into a "not found" error and then uses 404.php
How can I make WordPress go to a different custom page in case of a server error (500), as opposed to a simple page not found (404) error?
And before you tell me to put something like ErrorDocument 500 /path-to-custom-error-page in a .htaccess file, already tried that - it gets ignored by the web server, probably because the RewriteRule directives in the same file are used by WordPress to intercept and handle all requests (and no it doesn't matter if the ErrorDocument directive is above or below the WordPress RewriteRule section).
(Note: I tried researching this on my own, but search results are polluted by people complaining about getting server errors with WordPress, not asking how to create a custom page to handle them.)
WordPress will never be able to show your custom error page for a server error (500). You need to create a .html or PHP page, outside of WordPress. Your host may already have something to help you there, many have a folder into which you can put custom error pages, outside the website's root folder.
Since WP 3.0 you can override the standard error pages that wp_die() uses, with the wp_die_handler filter.
'wp_die' and 'wp_die_handler' are located in wp-includes/functions.php.
ErrorDocument 500 … should work in any case if the path is correct. Turn off WordPress's rewrite rules, produce a 500 error, and Apache should either show /path-to-custom-error-page or say it can't find it.

Reverse proxy heroku app to wordpress blog

I've managed to setup a reverse proxy of my heroku app with the following in config.ru
require ::File.expand_path('../config/environment', __FILE__)
use Rack::ReverseProxy do
reverse_proxy /^\/blog(.*)$/, 'http://blog.domain.com$1', opts={:preserve_host => true}
end
run Appname::Application
This allows my heroku app to run at domain.com and have domain.com/blog appear as the URL while the wordpress site is being served blog.domain.com. Great so far.
The wordpress site gets served properly when going to domain.com/blog, however when I go to any deeper page like an individual post wordpress throws an error. I was using permalinks with the date and title in the URL of the form: domian.com/blog/2012/07/a-great-blog-post - Worpress now seems to not like this. When I switched the links back to the form domain.com/blog/?p=4 the page gets served successfully.
It seems like it doesn't handle and sort of trailing slashes after the inial domain.com/blog properly. What I find strange is domain.com/blog/wp-admin (and the entire WP admin app) works without any hiccups.
Can anyone see any glaring issues why the pages/post with multiple slashes '/' might be causing problems?
Thanks in advance!
Well I found a solution, for whatever reason in the WP settings for the permalink, it didn't like any of the default options except for the form where it can retrieve the post by id. (http://www.domain.com/blog/?p=123)
For SEO purposes I wanted the title of the post to be in the URL. So I entered in the custom structure field:
/index.php/%postname%/
It seems like it was requiring index.php for wordpress to handle the routing properly.

Resources