404page – your smart custom 404 error page - Version 11.0.3

Version Description

bug fix for REST API call

Download this release

Release Info

Developer petersplugins
Plugin Icon 128x128 404page – your smart custom 404 error page
Version 11.0.3
Comparing to
See all releases

Code changes from version 11.0.2 to 11.0.3

Files changed (4) hide show
  1. 404page.php +1 -1
  2. inc/class-404page.php +3 -1
  3. loader.php +1 -1
  4. readme.txt +8 -2
404page.php CHANGED
@@ -9,7 +9,7 @@
9
* Plugin Name: 404page - your smart custom 404 error page
10
* Plugin URI: https://petersplugins.com/404page/
11
* Description: Custom 404 the easy way! Set any page as custom 404 error page. No coding needed. Works with (almost) every Theme.
12
- * Version: 11.0.2
13
* Author: Peter Raschendorfer
14
* Author URI: https://petersplugins.com
15
* Text Domain: 404page
9
* Plugin Name: 404page - your smart custom 404 error page
10
* Plugin URI: https://petersplugins.com/404page/
11
* Description: Custom 404 the easy way! Set any page as custom 404 error page. No coding needed. Works with (almost) every Theme.
12
+ * Version: 11.0.3
13
* Author: Peter Raschendorfer
14
* Author URI: https://petersplugins.com
15
* Text Domain: 404page
inc/class-404page.php CHANGED
@@ -318,7 +318,9 @@ if ( !class_exists( 'PP_404Page' ) ) {
318
// this is necessary to bypass a WordPress bug
319
// if permalink setting is something like e.g. /blog/%postname%/ the $posts is not empty
320
// bug reported https://core.trac.wordpress.org/ticket/46000
321
- if ( ( empty( $posts ) || ( isset( $wp_query->query['error'] ) && $wp_query->query['error'] == 404 ) ) && is_main_query() && !is_robots() && !is_home() && !is_feed() && !is_search() && !is_archive() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
322
323
// as of v2.1 we do not alter the posts argument here because this does not work with SiteOrigin's Page Builder Plugin, template_include filter introduced
324
$this->postid = $pageid;
318
// this is necessary to bypass a WordPress bug
319
// if permalink setting is something like e.g. /blog/%postname%/ the $posts is not empty
320
// bug reported https://core.trac.wordpress.org/ticket/46000
321
+
322
+ // as of v 11.0.3 we also check for REST_REQUEST to not create a 404 page in case of REST API call
323
+ if ( ( empty( $posts ) || ( isset( $wp_query->query['error'] ) && $wp_query->query['error'] == 404 ) ) && is_main_query() && !is_robots() && !is_home() && !is_feed() && !is_search() && !is_archive() && ( !defined('DOING_AJAX') || !DOING_AJAX ) && ( !defined('REST_REQUEST') || !REST_REQUEST ) ) {
324
325
// as of v2.1 we do not alter the posts argument here because this does not work with SiteOrigin's Page Builder Plugin, template_include filter introduced
326
$this->postid = $pageid;
loader.php CHANGED
@@ -36,7 +36,7 @@ function pp_404page() {
36
'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
37
'name' => '404page - your smart custom 404 error page',
38
'shortname' => '404page',
39
- 'version' => '11.0.2'
40
) );
41
42
}
36
'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
37
'name' => '404page - your smart custom 404 error page',
38
'shortname' => '404page',
39
+ 'version' => '11.0.3'
40
) );
41
42
}
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: petersplugins
3
Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page, missing, broken link, template, 404 link, seo, custom 404, custom 404 page, custom 404 error, custom 404 error page, customize 404, customize 404 page, customize 404 error page, classicpress
4
Requires at least: 4.0
5
Tested up to: 5.2
6
- Stable tag: 11.0.2
7
Requires PHP: 5.4
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -157,8 +157,11 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
157
158
== Changelog ==
159
160
= 11.0.2 (2019-08-30) =
161
- * two bugs fixed (seeh [here](https://wordpress.org/support/topic/version-11-0-1-error-in-log-file/) and [here](https://wordpress.org/support/topic/cant-activate-compatibility-mode/)
162
163
= 11.0.1 (2019-08-13) =
164
* fix for PHP 7.1 - __construct() access level in subclass - this is an PHP error that was fixed in PHP 7.2, but I've changed my code to also work with PHP 7.1
@@ -298,6 +301,9 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
298
299
== Upgrade Notice ==
300
301
= 11.0.2 =
302
two bugs fixed
303
3
Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page, missing, broken link, template, 404 link, seo, custom 404, custom 404 page, custom 404 error, custom 404 error page, customize 404, customize 404 page, customize 404 error page, classicpress
4
Requires at least: 4.0
5
Tested up to: 5.2
6
+ Stable tag: 11.0.3
7
Requires PHP: 5.4
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
157
158
== Changelog ==
159
160
+ = 11.0.3 (2019-09-01) =
161
+ * bug fix for REST API call (see [here](https://wordpress.org/support/topic/bug-woocommerce-rest-api-500-error/))
162
+
163
= 11.0.2 (2019-08-30) =
164
+ * two bugs fixed (see [here](https://wordpress.org/support/topic/version-11-0-1-error-in-log-file/) and [here](https://wordpress.org/support/topic/cant-activate-compatibility-mode/)
165
166
= 11.0.1 (2019-08-13) =
167
* fix for PHP 7.1 - __construct() access level in subclass - this is an PHP error that was fixed in PHP 7.2, but I've changed my code to also work with PHP 7.1
301
302
== Upgrade Notice ==
303
304
+ = 11.0.3 =
305
+ bug fix for REST API call
306
+
307
= 11.0.2 =
308
two bugs fixed
309