Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Feature request: Allow choosing PHP version for WordPress (Developer) app (was How to enable CORS on WordPress (Developer))

    WordPress (Developer)
    2
    12
    86
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jdaviescoates
      jdaviescoates last edited by girish

      I want to use this plugin https://docs.murmurations.network/developers/wp-aggregator.html

      But I can't even publish a page with it's shortcode, which I'm pretty sure is because CORS is not enabled:

      7c76e73b-6da8-4f10-9272-6ffe672ca56e-image.png

      I use Cloudron with Gandi & Hetzner

      girish 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff @jdaviescoates last edited by

        @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 ?

        jdaviescoates 1 Reply Last reply Reply Quote 0
        • jdaviescoates
          jdaviescoates @girish last edited by jdaviescoates

          @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)

          I use Cloudron with Gandi & Hetzner

          girish 1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @jdaviescoates last edited by

            @jdaviescoates An idea to eliminate CORS related issues is to use curl to query and see if the endpoint works.

            jdaviescoates 1 Reply Last reply Reply Quote 1
            • jdaviescoates
              jdaviescoates @girish 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!

              I use Cloudron with Gandi & Hetzner

              jdaviescoates 1 Reply Last reply Reply Quote 0
              • jdaviescoates
                jdaviescoates @jdaviescoates last edited by

                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
                

                I use Cloudron with Gandi & Hetzner

                jdaviescoates 1 Reply Last reply Reply Quote 0
                • jdaviescoates
                  jdaviescoates @jdaviescoates 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)?

                  I use Cloudron with Gandi & Hetzner

                  jdaviescoates 1 Reply Last reply Reply Quote 0
                  • Topic has been marked as a question  jdaviescoates jdaviescoates 
                  • jdaviescoates
                    jdaviescoates @jdaviescoates last edited by

                    @staff please move this into feature requests (can't see how to do that myself 🙂 )

                    I use Cloudron with Gandi & Hetzner

                    girish 1 Reply Last reply Reply Quote 1
                    • Topic is now a regular thread  girish girish 
                    • girish
                      girish Staff @jdaviescoates last edited by

                      @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 1 Reply Last reply Reply Quote 1
                      • jdaviescoates
                        jdaviescoates @girish 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? 🙂

                        I use Cloudron with Gandi & Hetzner

                        girish 1 Reply Last reply Reply Quote 0
                        • girish
                          girish Staff @jdaviescoates last edited by

                          @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 1 Reply Last reply Reply Quote 1
                          • jdaviescoates
                            jdaviescoates @girish 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 🙂

                            I use Cloudron with Gandi & Hetzner

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Powered by NodeBB