Code Monkey home page Code Monkey logo

custom-404-pro's Introduction

Custom 404 Pro

Banner

Override the default 404 page with any page from the Admin Panel or a Custom URL.

As always, if you do like the plugin, please take a minute and give it a rating. Thanks!

Features

  • Log a 404 error
  • Redirect 404 errors using popular redirect codes (301, 302 etc)
  • Export Logs (.csv)
  • Email the WordPress Admin when a 404 occurs

Installation

  • Extract the downloaded ZIP file.
  • Copy the custom-404-pro folder to the wp-content/plugins directory.
  • Activate from the Plugins Section.

Screenshots

Activate Plugin Activate Plugin

404 Logs 404 Logs

Global Settings Global Settings

Support

Please open issues on Github ONLY. I will not be using the WordPress.org Support Ticket System.

Rate

Please feel free to star on Github or leave a rating.

Donate

Like the plugin? Show your support by donating here (PayPal)

Changelog

You can find the full changelog here

custom-404-pro's People

Contributors

kunalnagar avatar renovate[bot] avatar rkorebrits-gsdh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

custom-404-pro's Issues

Warning: Undefined array key

Problem:

On general tab there are some warnings messages relate with undefined array keys.

Selección_352

When save changes button is used the site brakes showing some similar warnings.
Selección_353

More info:

In custom_404_pro_options table the send_email row does not have value.
Selección_354

404 error message on user profiles

Hi Kunal,

Here's a better explanation:

Scenario:

If Custom 404 is activated then then get my custom 404 message ("PageNotFound.PNG").

If Custom 404 is deactivated then then they get taken to the correct page and see the correct screen ("WhatShouldHappen.PNG"). e.g. http://www.leaseholdersforum.org.uk/users/paulginsberg/

Hope this fully explanation helps!

Cheers,
Paul
thelinkiclicked
pagenotfound
whatshouldhappen

Reflected XSS in logs.php

admin/views/logs.php

...
<div class="wrap">
	<h2>Logs</h2>
	<form id="form_logs" method="GET">
		<!-- For plugins, we also need to ensure that the form posts back to our current page -->
		<input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?>" />
		<!-- Now we can render the completed list table -->
		<p class="search-box">
			<label class="screen-reader-text" for="search_id-search-input">Search</label>
			<input id="search_id-search-input" type="text" name="s" value="
			<?php
			if ( array_key_exists( 's', $_GET ) ) {
				echo $_GET['s'];
			}
			?>
			" autocomplete="off" />
			<input id="search-submit" class="button" type="submit" name="" value="Search" />
		</p>
		<?php $logs_table->display(); ?>
	</form>
</div>

POC

http://localhost/wp-admin/admin.php?page=c4p-main&s=%22%3E%3Csvg%2Fonload%3Dalert%28%2Fxss%2F%29%3E

404 logs

Hello Kunal,

thanks for plugin Custom 404 Pro. Question: how am I supposed to know all the 404 logs and put them to the list? Does it mean all the wrong URL addresses which visitors entered? Thank you for support!

Cannot set 404 page

Hey Kunal,

I am using your plugin since 2 years now and it always worked fine. However, I just noticed that it does not let me set the right 404 page in Wordpress. After hitting save the chosen page is still not set. Do you have any idea? Here is a link to my website: www.mallorca-retreat.com.

Chris

[Feature Request] Log without IP

Thank you for the nice plugin.

I have a feature request:
Could you please implement an option that prevents the IP address from being stored in the database?
Is here quite a privacy relevant topic.

Thanks

email question

When I get an email with the 404 error it is from me and sent to me. (administrator) So it goes into my inbox AND sent folder. And when I delete it from the sent folder it deletes the inbox email too. How can I fix this?
Thanks!

Custom 404 Pro Issues

I have the Custom 404 plug in and I am trying to remove it from my Wordpress site and it will not delete. It is throwing a ton of errors. Help!
404s

Not Working with error type 404

I’ve using the mode “Wordpress Page” and I’ve selected a page “Siden finnes ikke”.

But when I’m choosing the 404 under error type it loads the default 404 Genesis page, when I’m using Error Type 302 it displays “Siden finnes ikke”. But it’s important that google and other search engines get 404 and not 302 error type.

https://elhub.no/

Not getting 404 status code.

Related to: #13

Hi Kunal, I'm not so sure about this. I've been checking out our logs now, but we are not seeing any 404 messages, but just the default 302.

What do you mean by "By default, if no redirect is set, you will get a 404". How does one set a redirect, or rather, how to not set it? So that we do get 404s.

Why didn't you just add 404 to the drop-down also? I always want 404s to display as 404, so that when we scan the site, we can see which pages aren't redirected to an actual page.

When I mentioned the 301 as an addition, it was more as an example. I can't imagine anyone wanting a 301 redirect to the 404 page..? The 404 is a lot more important.

2 Feature Requests

Hi.

First of all, this is a great plugin. The concept is great and makes it easy to create a custom 404 page.

I would like to request two features that I think would be very practical in managing the logs:

  1. Add a "Clear Log" button that allows the entire log to be erased easily with one click
  2. Add the option to turn off logging (for those of us who just want to use the 404 page creation without adding a lot of records to the database).

Thanks for your effort on this pluggin.

Certain (bad) link goes to bluehost 404 page not my custom 404 page

I was going through the 404 errors in my Google Webmaster Tools and discovered a bad link that was pulling my my web host's 404 page not my custom 404 page like all my other bad links show. The url of the page that was showing the bluehost 404 page is: http://www.shareyourrepair.com/search/label/A/C

I contacted bluehost and they tinkered around with my site and renamed the bluehost 404 page and then that link above started redirecting to my homepage instead, which still isn't what should happen. Anyway, I just wanted to see what you thought about this issue. Thanks again for your plugin, it has been VERY useful to me.

John

AdminClass.php Error on line 116

I’m getting thousands of error lines on my logs with the following message:

[12-Jul-2023 21:03:45 UTC] PHP Warning: Undefined array key "form-logs-options" in /home/user/public_html/wp-content/plugins/custom-404-pro/admin/AdminClass.php on line 116
[12-Jul-2023 21:03:56 UTC] PHP Warning: Undefined array key "form-logs-options" in /home/user/public_html/wp-content/plugins/custom-404-pro/admin/AdminClass.php on line 116
[12-Jul-2023 21:04:23 UTC] PHP Warning: Undefined array key "form-logs-options" in /home/user/public_html/wp-content/plugins/custom-404-pro/admin/AdminClass.php on line 116

It seems I’m not the only one with the error, as others have reported the same on the WordPress support forum.

Are the developers aware and do they have any plans to fix this error?

Thanks.

Unfortunately, I had to disable this plugin until this is fixed. No idea if it’s causing other adverse side effects on my site.

Also, suggestion: It would be a good idea for the developer to create a Pinned topic on WordPress support forum asking users NOT to post support requests there, but here. Many like me post there, unaware that you do not support those forums and people are getting the idea that your plugin is abandoned.

URL of 404 page

Hey Kunal,

I've set up a custom 404 page within my Wordpress theme, but how do I make sure the incorrect URL e.g. '.com/cndjv' is displayed in the address bar versus the '.com/404' I had to set when creating the new page – when the loaded 404 page is displayed to the user?

Thanks,
Paul

Issue with 404 page

Hi there,

We had to deactivate the plugin due to it affecting our form submissions and we were wondering if you could fix this error so we could reactivate it and use our custom 404.

[Wed Apr 15 20:08:56.215552 2020] [php7:notice] [pid 6208] [client 134.122.81.145:16988] WordPress database error Table 'wp_beckwood4100.wp_custom_404_pro_options' doesn't exist for query SELECT * FROM wp_custom_404_pro_options /* From [beckwoodpress.com/technology/rapid-prototyping/sites/all/libraries/mailchimp/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php] in [/nas/content/live/beckwood4100/wp-content/plugins/custom-404-pro/admin/AdminClass.php:143] */ made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, AdminClass->custom_404_pro_redirect

Title Blog

Hello friend, thanks for this great plugin, I've been looking for something like that for a long time.
I have a request for you, I will certainly like more people, if you could give me immediate advice, I would be grateful to you.
I use the plugin on 3 sites, all of them have the same admin email, so unfortunately I never know which site the bug comes from, because the emauli message does not contain the name or website URL, just the error link in the form:

404 Path | /sitemap-pt-page-2014-09.xml

How do I add a site name to the subject of the message?

Public facing css in the header ?

Hi,

Great Plugin, nice work.
Is there a reason why the public facing css is in the header ? It doesn't look like its doing anything.
It would be great to remove it with an option if possible.

Thanks
Jason

People seeing 404 when they shouldn't be

I've got users seeing 404 error messages when they should actually be seeing profile pages - as soon as I deactivate Custom 404 Pro everything works properly.

e.g. http://www.leaseholdersforum.org.uk/users/paulginsberg/ just displays the 404 but
http://clf.cloud-genius.com/users/paulginsberg/ (my staging website with Custom 404 Pro deactivated) displays the page properly.

Any ideas? I'm a Wordpress amateur but happy to help troubleshoot/find the source of the issue in any way I can.

Version 1.4.4 is in use.

Soft 404

404 Page Error

Hi.

Site: www.maikamuyka.com
custom error page: www.maikamuyka.com/not-found-page.html

Instead of redirecting to my custom error page, you get this: "Not Found The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

I have an html site, but a wordpress blog. There is a wp .htaccess file in the directory that reads:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www.)?tlgapc.com$ [NC]
RewriteRule ^(.*)$ https://www.tlgapc.com/$1 [L,R=301]

BEGIN WordPress

The directives (lines) between "BEGIN WordPress" and "END WordPress" are

dynamically generated, and should only be modified via WordPress filters.

Any changes to the directives between these markers will be overwritten.

RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

if I delete the .htaccess file and try to create my own it still doesn't work. It gives the following error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Request

Awesome, simple and to the point plugin.

A space would be a little helpful in the email sent to the site admin.

Example excerpt from one of my email reports: "...Path/pow-wow/img/a17.pngUser AgentMozilla/5.0 (Windows NT 6.1; Win64; x64)..."
Space is lacking between a17.png and User Agent.

Also even more helpful would be to return the output from $_SERVER["HTTP_REFERER"]; as part of the email report so we could easily find the page with the offending link.

Thanks for consideration.

Doesn't display the custom page I created

I've created the page, set it to use a wordpress page and chosen that page in the drop down below. 404s are being logged but the custom page doesn't show. How can I fix this?

Parse error: syntax error, unexpected '['

Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected '[' in [...]/wp-content/plugins/custom-404-pro/admin/class-custom-404-pro-admin.php on line 414

Is your plugin is working?

I don't think your plugin is working on any way. I test it on the two Wordpress sites. on both show me a default wordpress 404 from theme. I test it by custom url and show a page via plugin settings and i do this with TWO wordpress installation both was on different theme. tnx.
In fast i setup another page with default WP theme and no plugins only yours and is no working. So sorry no your plugin is no working. tnx.

Redirect not working..

hi im using wp super cache with my site. my redirect is sending me to my old 404.php page, which i had renamed so technically it doesnt exist. its still appearing with the theme 404 page instead of my custom page. Whats going on? any help is appreciated. using SEOSMagazine premium template

Multi-language site

Hi there, first of all thanks for your great plugin.
Also, I apologize for my English, I know it’s not the best…
I would like to fix this issue:
I’ve created a custom 404 page in three languages, using WPML plugin.
The problem is that always (in any language) the wrong URL is redirected to the Italian version of the custom page 404.
Is there any way to fix it, please?
Thank you.

Invalid argument supplied for foreach() line 129

I am getting an error in the wordpress backend saying:

Invalid argument supplied for foreach() in [...]/wp-content/plugins/custom-404-pro/admin/class-custom-404-pro-admin.php on line 129

Wordpress Version 4.2.2.
If you need any more info I think I can reproduce the error after activating the plugin.

Redirect not working

Hi Kunal,

When I enter a URL that does not exist on my site, it is not redirecting to the specified 404 page, and therefore any changes I make to my 404 page are not updating. Please let me know if I have not defined my 404 redirect correctly.

Thanks,
Aidan

unnesessary css and js loading everywhere :(

Hi,
thanks for the great plugin.
Just wonder why css and js you load on every existing page?
There is the way to check first if page exists and shut down loading those files.
Is it so hard?

Regards.

Clearing logs

Hi there,
I can't seem to be able to clear some of the logs (now turned logging off) - where are these located in the db so i could remove them please?

Regards,
Jack

Feature Suggestion

It would be great to have the option to turn off the 404 logging.. We recently completely redesigned the site and are getting up to 10 new log entries a minute.

Lots of log entries

Custom 404 Pro was installed on a site less than a month ago and currently has almost 35,000 entries logged. Our database "postmeta" table has over 500,000 rows, and the custom 404 pro logging appears to be the culprit. Every log results in 17 rows in the table. That makes sense since: 17 x 34,600 = ~500,000.

I've just turned off logging and would like to clear the log soon, but I'll wait in case you want me to check something out for debugging.

Here's an example of one of the logs:

User IP
72.167.190.173

404 Path
/c4p_log/log-34395/

User Agent
WordPress/4.5.2; {{ site url }} <-- changed for privacy

Redirect
Global Settings Apply (Page)

Date Published
5 hours ago

Bug: Search criteria appears in all page views

Since I loaded your plugin, when i go to the "All Posts" or "All Pages" page within WPAdmin it displays the search criteria you have for the log pages (browser, os, browser version). Can that information only appear on the 404 Log page instead of all page lists?

Custom 404 causing database error

Hi, my custom 404 page is working fine, but I'm getting the following error message which appears multiple times across my wordpress admin screens, especially the menu screen:
"Notice: Undefined index: c4p_log_redirect_to in /home/stereoso/public_html/wp-content/plugins/custom-404-pro/admin/class-custom-404-pro-admin.php on line 167" (various other line refs)
Can you help? Deactivating the plugin stops this from happening, but obviously I'd prefer to have the 404 redirect in place,

Thanks,
SW

404 Pro not working

I just updated Custom 404 Pro to version 3.0.0. I tried using both a Wordpress page and the link to the page, but neither worked. Also the settings revert back to 'None' when the settings page reloads.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.