Support » Plugin: Ninja Forms - The Easy and Powerful Forms Builder » Notice: Javascript needed

  • Resolved xibel

    (@xibel)


    Last week I was running Nina version 3.0.34.1. everything was working well.
    I upgraded to version 3.1. I am using the Customizer theme. The Customizer theme displays a short page excerpt for three pages but the original text is replaced by the following error:

    Notice: JavaScript is needed. var formDisplay = 1; /* Maybe initialize nfForms object */ var nfForms = nfForms || …

    I have disabled the Ninja plugin and then the error is gone and shows the excerpt text again. What happened with Ninja 3.1 and is there a solution to fix this error?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Kevin Stover

    (@kstover)

    Hi,

    It sounds like you have a conflict with your theme or another plugin. Do you have any caching plugins or anything that minifies page output? Sometimes those can cause problems with plugins that localise JS data to the page.

    I sure do have a conflict. I restored a previous vm state and upgraded all plugin’s to simulate the moment it should brake. But it does not happen. So back to the broken vm to find out what is causing this error.

    I use the Customizr theme and the latest Ninja plugin. If I disable Ninja the error is gone. I also tried to completely remove the Ninja plugin including the database tables. Reinstalled, activated Ninja and the error is back.
    I removed the Customizr theme, reinstalled and the error is back. Even the I do not have a single Form created.

    So this leaves me with no clue what is causing this error on the front page of http://www.oranjeverenigingtuil.nl

    If I completely remove Ninja and reinstall it the error is back, when with dropping tables that are related to Ninja. Is there anything else I can check in the database or files?

    Plugin Author James Laws

    (@jameslaws)

    The issue isn’t with Ninja Forms specifically based in yours and Kevin’s description. To be clear, if the only thing you do is switch to a default theme and deactivate all non-Ninja Forms plugins, do you still see this error?

    As soon as I deactivate Ninja Forms the error is gone. If I activate it, it returns.

    You can see what I mean at http://www.oranjeverenigingtuil.nl. On the front page below the three main articles.

    Now I know the error is in the database. I took the database from a broken snapshot and restored it to a fine working one. Again the website shows the Java error. Now finding the cause in the database 🙁

    Next step. I am able to reproduce the error. On the front page I have articles and messages. When I attach a Ninja Form to a message the error occurs on the Article level.

    Now, you tell me what is causing this?

    If I remove the Ninja Form from the message the error is gone.

    Another update:

    If I use the plugin option “Append a Ninja Form” within posts I get the error on the main page. If I add a Ninja Form as with “[ninja_form id=10]”. There is no Java error.

    So for now I have a solution. I leave it up to you guys to investigate further. If I browse in Google on the Java error. I see a lot of Worpress Sites with that error so maybe it is wise to investigate this behaviour.

    Plugin Author Kevin Stover

    (@kstover)

    Hi,

    Just wanted to pop back in here and say good work on the investigating.

    It would appear that the theme doesn’t properly enqueue our JS files when we need them. Using the shortcode forces those JS files to load, which is why it works in that instance.

    We’ll dig into this further and see if there is any mitigation we can do from our end, but for now, I’m going to mark this as closed.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Notice: Javascript needed’ is closed to new replies.