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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. Rest API Error after migration

Rest API Error after migration

Scheduled Pinned Locked Moved WordPress (Developer)
11 Posts 2 Posters 1.8k Views 2 Watching
  • 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.
    • D Offline
      D Offline
      derin
      wrote on last edited by
      #1

      Getting an error on the rest api:
      The REST API call gave the following unexpected result: (404) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.29 (Ubuntu) Server at designs.5di.me Port 443</address> </body></html> .

      This is a site that I migrated using all in one migration. I notied some things weren't working so i deactivated all plugins and went back to original theme. I see this error in site health.
      Not sure how to proceed to fix this on cloudron.

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @derin Is the site itself working and is only the REST API giving errors?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          derin
          wrote on last edited by
          #3

          yes the site itself its totally working. Just the rest-api isnt, which is a problem because I intended to use it as my design template library. The core functionality requires the rest-api to work. Which is probably what caused it to error. My not deactivating the plugin before I packaged it for migration. Im just not sure how to go about fixing it.

          the site is https://designs.5di.me

          1 Reply Last reply
          0
          • D Offline
            D Offline
            derin
            wrote on last edited by derin
            #4

            I had two plugins that used the rest api in a way that could have caused this, they are both deactivated and the error on the rest api still persists. Do i delete their options tables or amm I thinking in the wrong way? I got the same error when I tried to do anything related to the sites functions which prompted me to deactivate all plugins, problem persisted.

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              The REST API does seem to work:

              $ curl -X OPTIONS -i https://designs.5di.me/wp-json/
              HTTP/2 200 
              server: nginx
              date: Wed, 14 Oct 2020 04:12:14 GMT
              content-length: 0
              allow: HEAD,GET,POST,OPTIONS
              strict-transport-security: max-age=15768000
              x-xss-protection: 1; mode=block
              x-download-options: noopen
              x-content-type-options: nosniff
              x-permitted-cross-domain-policies: none
              referrer-policy: no-referrer-when-downgrade
              

              Could it be related to permalink style? It's under Settings in the WP dashboard (because I notice that your posts are of the year/month/date format)

              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @derin If you go to the app's configure view and then Console -> Logs. It will probably show some error in the logs. Anything interesting there?

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  derin
                  wrote on last edited by
                  #7

                  I didn't see anything out of the ordinary. Perhaps you will. log.txt

                  If not I may just migrate again with all plugins deactivated prior to packaging to see if works.

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #8

                    @derin I see the 404 in the logs

                    2020-10-14T04:13:02.000Z 172.18.0.1 - - [14/Oct/2020:04:13:02 +0000] "GET /2020/09/01/hello-world/ HTTP/1.1" 404 457 "https://designs.5di.me/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
                    

                    So, just to double check: the posts are inside the admin panel just fine but getting the pages like above doesn't work? Usually, this just means that either htaccess is messed up OR the permalink structure is wrong. When you navigate to the post via the WordPress Dashbaord what do you see in the URL bar?

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      derin
                      wrote on last edited by
                      #9

                      Going to the posts is seems fine at the moment. The things that do not work are when the system tries to make an api call out. So for example, i attempted to re-authenticate a plugin - Envato Elements using my api key and it displayed the error shown above. Then I tried contect to an external website that this would feed data to using another plugin called Project Huddle, and I got the same API error. I actually had not attempted to even look at a post. This site will serve as a repository of elementor templates. So I can store all the templates I create and easily push changes to the client sites connected. There isnt a plan for a front end except to check if a template looks good.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        derin
                        wrote on last edited by
                        #10

                        https://designs.5di.me/test/
                        Created a test post which worked after I updated permalink structure which was set incorrectly.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          derin
                          wrote on last edited by
                          #11

                          Wait the permalink thing fixed the error I believe.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search