Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer))
-
@jdaviescoates a CORS error usually looks very different . See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors for a screenshot, you will see a message in browser devtools.
In your screenshot, it's a 500 which is an internal server error most likely indicating the server crashed. Does that plugin support PHP 8.1 ?
wrote on Mar 11, 2023, 9:37 AM last edited by jdaviescoates Mar 11, 2023, 9:39 AM@girish said in How to enable CORS on WordPress (Developer):
CORS error usually looks very different
Oh.
It was the
strict-origin-when-cross-origin
bit that made me thing perhaps it was a CORS issue (and because what it's trying to do is pull in an display a map of data from elsewhere)@girish said in How to enable CORS on WordPress (Developer):
Does that plugin support PHP 8.1
I'm guessing so because it definitely supports 8.0.21 (I'm guessing likely to too much difference between 8.0.21 and 8.1.2)
-
@girish said in How to enable CORS on WordPress (Developer):
CORS error usually looks very different
Oh.
It was the
strict-origin-when-cross-origin
bit that made me thing perhaps it was a CORS issue (and because what it's trying to do is pull in an display a map of data from elsewhere)@girish said in How to enable CORS on WordPress (Developer):
Does that plugin support PHP 8.1
I'm guessing so because it definitely supports 8.0.21 (I'm guessing likely to too much difference between 8.0.21 and 8.1.2)
@jdaviescoates An idea to eliminate CORS related issues is to use curl to query and see if the endpoint works.
-
@jdaviescoates An idea to eliminate CORS related issues is to use curl to query and see if the endpoint works.
wrote on Mar 14, 2023, 1:28 PM last edited by@girish sorry, I don't know how to do that and I'm also not sure what the endpoint is.
But I can confirm that this is a Cloudron related issue. The plugin works fine on all my non-Cloudron WordPress sites.
Help!
-
@girish sorry, I don't know how to do that and I'm also not sure what the endpoint is.
But I can confirm that this is a Cloudron related issue. The plugin works fine on all my non-Cloudron WordPress sites.
Help!
wrote on Mar 14, 2023, 2:46 PM last edited byI wonder if the issue is how new our PHP version is! (because the other sites where it's working have older versions).
And also because I saw this in the logs:
2023-03-14T14:03:49.000Z [Tue Mar 14 14:03:49.500973 2023] [php:error] [pid 533] [client IPaddress] PHP Fatal error: Uncaught TypeError: array_replace_recursive(): Argument #1 ($array) must be of type array, null given in /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php:222\nStack trace:\n#0 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(222): array_replace_recursive()\n#1 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(65): Murmurations\\Aggregator\\Schema::dereference()\n#2 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(96): Murmurations\\Aggregator\\Schema::load()\n#3 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-interfaces.php(79): Murmurations\\Aggregator\\Schema::get()\n#4 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-interfaces.php(45): Murmurations\\Aggregator\\Interfaces::prepare()\n#5 /app/data/public/wp-includes/shortcodes.php(355): Murmurations\\Aggregator\\Interfaces::Murmurations\\Aggregator\\{closure}()\n#6 [internal function]: do_shortcode_tag()\n#7 /app/data/public/wp-includes/shortcodes.php(227): preg_replace_callback()\n#8 /app/data/public/wp-includes/class-wp-hook.php(308): do_shortcode()\n#9 /app/data/public/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#10 /app/data/public/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1857): apply_filters()\n#11 /app/data/public/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(949): WP_REST_Posts_Controller->prepare_item_for_response()\n#12 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(1171): WP_REST_Posts_Controller->update_item()\n#13 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request()\n#14 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch()\n#15 /app/data/public/wp-includes/rest-api.php(410): WP_REST_Server->serve_request()\n#16 /app/data/public/wp-includes/class-wp-hook.php(308): rest_api_loaded()\n#17 /app/data/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#18 /app/data/public/wp-includes/plugin.php(565): WP_Hook->do_action()\n#19 /app/data/public/wp-includes/class-wp.php(399): do_action_ref_array()\n#20 /app/data/public/wp-includes/class-wp.php(780): WP->parse_request()\n#21 /app/data/public/wp-includes/functions.php(1332): WP->main()\n#22 /app/data/public/wp-blog-header.php(16): wp()\n#23 /app/data/public/index.php(17): require('...')\n#24 {main}\n thrown in /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php on line 222, referer: https://map.bridport.coop/wp-admin/post-new.php?post_type=page
-
I wonder if the issue is how new our PHP version is! (because the other sites where it's working have older versions).
And also because I saw this in the logs:
2023-03-14T14:03:49.000Z [Tue Mar 14 14:03:49.500973 2023] [php:error] [pid 533] [client IPaddress] PHP Fatal error: Uncaught TypeError: array_replace_recursive(): Argument #1 ($array) must be of type array, null given in /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php:222\nStack trace:\n#0 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(222): array_replace_recursive()\n#1 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(65): Murmurations\\Aggregator\\Schema::dereference()\n#2 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php(96): Murmurations\\Aggregator\\Schema::load()\n#3 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-interfaces.php(79): Murmurations\\Aggregator\\Schema::get()\n#4 /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-interfaces.php(45): Murmurations\\Aggregator\\Interfaces::prepare()\n#5 /app/data/public/wp-includes/shortcodes.php(355): Murmurations\\Aggregator\\Interfaces::Murmurations\\Aggregator\\{closure}()\n#6 [internal function]: do_shortcode_tag()\n#7 /app/data/public/wp-includes/shortcodes.php(227): preg_replace_callback()\n#8 /app/data/public/wp-includes/class-wp-hook.php(308): do_shortcode()\n#9 /app/data/public/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#10 /app/data/public/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1857): apply_filters()\n#11 /app/data/public/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(949): WP_REST_Posts_Controller->prepare_item_for_response()\n#12 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(1171): WP_REST_Posts_Controller->update_item()\n#13 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(1018): WP_REST_Server->respond_to_request()\n#14 /app/data/public/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch()\n#15 /app/data/public/wp-includes/rest-api.php(410): WP_REST_Server->serve_request()\n#16 /app/data/public/wp-includes/class-wp-hook.php(308): rest_api_loaded()\n#17 /app/data/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()\n#18 /app/data/public/wp-includes/plugin.php(565): WP_Hook->do_action()\n#19 /app/data/public/wp-includes/class-wp.php(399): do_action_ref_array()\n#20 /app/data/public/wp-includes/class-wp.php(780): WP->parse_request()\n#21 /app/data/public/wp-includes/functions.php(1332): WP->main()\n#22 /app/data/public/wp-blog-header.php(16): wp()\n#23 /app/data/public/index.php(17): require('...')\n#24 {main}\n thrown in /app/data/public/wp-content/plugins/murmurations-aggregator/includes/class-schema.php on line 222, referer: https://map.bridport.coop/wp-admin/post-new.php?post_type=page
wrote on Mar 14, 2023, 5:40 PM last edited by@jdaviescoates yep, I'm pretty sure the issue is actually that the plugin isn't compatible with php 8.1 (nor 8.0.27 seemingly).
I installed WordPress on a Cloudron LAMP app. First of all I tried 8.0 (which is actually 8.0.27) but it didn't work (it does work with 8.0.21).
So then I tried 7.4 and it worked.
So I guess I just use it in the LAMP app if I want to use it now, or wait for the plugin to support PHP 8.1 to use it with the WordPress app.
Or is there a way to choose a different PHP version with the WordPress app too (like there is for the LAMP app)?
-
-
@jdaviescoates yep, I'm pretty sure the issue is actually that the plugin isn't compatible with php 8.1 (nor 8.0.27 seemingly).
I installed WordPress on a Cloudron LAMP app. First of all I tried 8.0 (which is actually 8.0.27) but it didn't work (it does work with 8.0.21).
So then I tried 7.4 and it worked.
So I guess I just use it in the LAMP app if I want to use it now, or wait for the plugin to support PHP 8.1 to use it with the WordPress app.
Or is there a way to choose a different PHP version with the WordPress app too (like there is for the LAMP app)?
wrote on Mar 14, 2023, 5:51 PM last edited by@staff please move this into feature requests (can't see how to do that myself
)
-
-
@staff please move this into feature requests (can't see how to do that myself
)
@jdaviescoates I renamed the thread for the moment. I think best bet to support EOLed PHP is to use lamp stack at the moment.
-
@jdaviescoates I renamed the thread for the moment. I think best bet to support EOLed PHP is to use lamp stack at the moment.
wrote on Mar 14, 2023, 7:05 PM last edited by@girish said in Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer)):
@jdaviescoates I renamed the thread for the moment. I think best bet to support EOLed PHP is to use lamp stack at the moment.
OK, thanks. But what harm is there in having it in Feature Requests where it belongs?
-
@girish said in Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer)):
@jdaviescoates I renamed the thread for the moment. I think best bet to support EOLed PHP is to use lamp stack at the moment.
OK, thanks. But what harm is there in having it in Feature Requests where it belongs?
@jdaviescoates Feature Requests is for platform code (that's what I think anyway). Not sure where things like these belong, tbh. But I put them in app sections so we can find them easily later.
-
@jdaviescoates Feature Requests is for platform code (that's what I think anyway). Not sure where things like these belong, tbh. But I put them in app sections so we can find them easily later.
wrote on Mar 15, 2023, 12:32 PM last edited by@girish said in Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer)):
Feature Requests is for platform code (that's what I think anyway).
Wouldn't it take some platform code to enable this in the same way it's been enabled for the LAMP app?
In my mind "Feature Requests" is just for "features" as that's what it says on the tin. But no biggie, as you please