• Resolved brocatus

    (@brocatus)


    I have a site which uses Advanced Custom Fields (ACF) and Custom Post Type UI (CPTUI) and Polylang. I upgrades Word press and plugins from version 3.x to the latest versions. Now I cannot use any Ajax in the backend in my custom post type any more. When I try to deactivate Polylang I get a white screen / sire crashes. When I go ‘back’ its OK again.

    So I think Polylang is causing this weird behaviour in my custom post type with custom fields; but I cannot disable it to test it. This all is only a problem in the backend btw, so I do not think ‘the theme’ is involved here. I wish I could just delete polylang and go and use WPML. But I cannot.

    Anybody know what I can do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    You added custom code using a Polylang function and you don’t check that the function exists. See the IMPORTANT section here: https://polylang.pro/doc/function-reference/

    Thread Starter brocatus

    (@brocatus)

    Thank you for the pointer. But this occurs in the backend; where does it execute my functions? I figure in functions.php… so I added the checks there. But that makes no difference to the problem. Should I add them anywhere else? The strange thing is I use these functions in front end templates on the site but without problems there.

    Thread Starter brocatus

    (@brocatus)

    OK I added the check everywhere I use one of these functions. This did not solve the problem. Front end works and displays as it should. Backend I am not able to upload an image or add a row to a repeater field because the javascript for ACF does not run.

    javascript errors in console:
    [Error] ReferenceError: Can’t find variable: acf
    (anonymous function) (input.js:13)
    Global Code (input.js:290)
    [Error] ReferenceError: Can’t find variable: acf
    (anonymous function) (post.php:133)
    Global Code (post.php:145)
    [Error] ReferenceError: Can’t find variable: acf
    Global Code (post.php:2500)

    Thread Starter brocatus

    (@brocatus)

    Sorry that was another level of the problem I am working on. The good news is I WAS able to deactivate polylang.

    So now I could test if the issue was caused by polylang. It was not. Thank you for your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Deactivating polylang crashes site’ is closed to new replies.