To create a Bug report, Feature or Refund Request please login first.

DPlugins Support

Saving Oxygen Page with Global Code Blocks returns 200 Error

When I have PHP codeblocks that have tags in them that include <?php code, I get an error 200 saving those pages in Oxygen Builder, even when "Exclude page builders" is turned on

6 responses to “Saving Oxygen Page with Global Code Blocks returns 200 Error”

  1. cmsexpertss@gmail.com Avatar

    Hi,

    Can you please explain in details that which code block when you enable it then you get some error?

    Regards,
    Muhammad Osama

  2. Jared Smith Avatar
    Jared Smith

    There are 2 code blocks with a Script Tags column tag of “Global” (Get the Nonce, and Global Functions). I get the error 200, if I edit and save the Home page with Oxygen, when those 2 blocks are active.

    Your code change suggestions on my other REST API endpoints ticket were very helpful. If you have any suggestions on a better way to get the Nonce so I can use it in my AJAX calls to the endpoints, please let me know.

    1. cmsexpertss@gmail.com Avatar

      Hi,

      I checked it basically you had written the nonce code in another code block which is “Wellness Challenge Home” so you had to turn on “Exclude page builders” on this one as well and also you had to turn it on on “Global Functions”. Its working fine now and there is no error in Oxygen editor.

      Regards,
      Muhammad Osama

  3. Jared Smith Avatar
    Jared Smith

    I have now turned on “Exclude page builders” on every single code block, But when I edit the Home page in Oxygen and save, I’m still getting the 200 error.

    However the error goes away when I toggle off “Enable Code Block” for the “Global Functions” and “Get the Nonce” code blocks

    So the “Exclude page builders” doesn’t seem to solve the problem, only the “Enable Code Block” off does.

    1. cmsexpertss@gmail.com Avatar

      Hi,

      The issue was they way your code block “Get the Nonce” was written, I have changed it because oxygen was not taking it correctly while saving the content. Now its saving fine.

      Regards,
      Muhammad Osama

  4. Jared Smith Avatar
    Jared Smith

    YOU ARE AWESOME!
    Thank you so much for both the REST API code instruction and on this.
    Such a HUGE help.