Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • 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

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. Multilanguage | 'invalid desktop json!'

Multilanguage | 'invalid desktop json!'

Scheduled Pinned Locked Moved Bug Reports
5 Posts 3 Posters 504 Views
  • 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.
  • K Offline
    K Offline
    kubmin
    wrote on last edited by kubmin
    #1

    Hi there!

    Using the awesome multilanguage for a website is causing some problems which I cannot seem to fix.

    When creating a simple project with one image and/or text, the website is unable to fetch some json. This happens in either the translated page (i.e from GE to GB) or on the 'original' page (i.e from GB to GE).

    On page load, the console logs:
    invalid desktop json!

    Loading the homepage while on the translated site logs the following:

    GET http://localhost/~user/test/en/wp-json/wp/v2/posts/71 401 (Unauthorized)

    Full json response:

    // http://localhost/~user/test/en/wp-json/wp/v2/posts/41
    
    {
      "code": "rest_forbidden",
      "message": "Sorry, you are not allowed to do that.",
      "data": {
        "status": 401
      }
    }
    

    The not translated homepage logs the same.

    Any idea what's causing this? Thanks.

    Best,
    K


    UPDATE #1:

    I found out that the caption below the image is causing the problems. I guess it has something to do with that piece of text (caption) not having a option to translate. For now, deleting the caption seems to help.


    UPDATE #2:

    Got it, you have to click on the flag that you are editing with the gridder. Add the image and add the caption. After that, click on the other flag and start editing the image caption by double clicking. Edit the caption line (even when you want to have the same text, like names of people, places etc). Click ok. Finally, update/publish the page and voila, it works!

    F 1 Reply Last reply
    1
    • K kubmin

      Hi there!

      Using the awesome multilanguage for a website is causing some problems which I cannot seem to fix.

      When creating a simple project with one image and/or text, the website is unable to fetch some json. This happens in either the translated page (i.e from GE to GB) or on the 'original' page (i.e from GB to GE).

      On page load, the console logs:
      invalid desktop json!

      Loading the homepage while on the translated site logs the following:

      GET http://localhost/~user/test/en/wp-json/wp/v2/posts/71 401 (Unauthorized)

      Full json response:

      // http://localhost/~user/test/en/wp-json/wp/v2/posts/41
      
      {
        "code": "rest_forbidden",
        "message": "Sorry, you are not allowed to do that.",
        "data": {
          "status": 401
        }
      }
      

      The not translated homepage logs the same.

      Any idea what's causing this? Thanks.

      Best,
      K


      UPDATE #1:

      I found out that the caption below the image is causing the problems. I guess it has something to do with that piece of text (caption) not having a option to translate. For now, deleting the caption seems to help.


      UPDATE #2:

      Got it, you have to click on the flag that you are editing with the gridder. Add the image and add the caption. After that, click on the other flag and start editing the image caption by double clicking. Edit the caption line (even when you want to have the same text, like names of people, places etc). Click ok. Finally, update/publish the page and voila, it works!

      F Offline
      F Offline
      f.albert
      wrote on last edited by
      #2

      Hi @kubmin
      Good to hear you solved the problem.
      The desktop json should never be invalid. Can you tell me your laytheme version?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kubmin
        wrote on last edited by
        #3

        Hi f.albert!

        I'm running a dev environment with Lay Theme version 2.5.6 in combination with Wordpress version 4.9.7! Hope that helps.

        1 Reply Last reply
        1
        • F Offline
          F Offline
          f.albert
          wrote on last edited by
          #4

          Hi @kubmin

          I think we found the bug:
          Please go to Settings -> Languages (General) -> Untranslated Content -> uncheck "Show displayed language prefix when content is not available for the selected language."

          This option can invalidate the json.

          1 Reply Last reply
          1
          • mariusjopenM Offline
            mariusjopenM Offline
            mariusjopen
            Global Moderator
            wrote on last edited by
            #5

            Perfect :-) :-) :-)

            www.mariusjopen.world

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


            I also code custom websites or custom Lay features.
            šŸ’æ Email me here: šŸ’æ
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

            This often solves issues you might run into

            When you post:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

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