1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

JSON.decode is undefined with redirect plugin

Discussion in 'Community' started by lucfit, Sep 24, 2021.

  1. lucfit

    lucfit New Member

    Level: Community
    Hi,

    I have a form using the redirect plugin when submitted.

    It was working well until yesterday. Since today the redirect stopped to work and I get this error back:

    JSON.decode is not a function JSON.decode(b.this.option.secure)','JSON.decode is undefined

    Nothing has changed in joomla nor server side.

    Anyone can help please?

    Thank you in advance!
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Which file is mentioned with this error message?
     
  3. lucfit

    lucfit New Member

    Level: Community
    Hi,

    /media/com_fabrik/js/dist/utils.js?bust=1632763209

    this appears when submitting the form.

    Thank you for your help
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Enable "Debug JS" in Fabrik Options[Debugging][Allow fabrikDebug] and post here again the file(s) and line numbers mentioned in your browser console.
     
  5. lucfit

    lucfit New Member

    Level: Community
    Hi thank you for your reply

    here the debugging link: https://piscinedesjoyaux.it/?fabrikdebug=1

    this is the error I get over the form:

    JSON.decode is not a function. (In 'JSON.decode(b,this.options.secure)', 'JSON.decode' is undefined)

    this is the error the console is reporting:

    {"modified":{"contatti___date_time":"2021-09-28 15:17:43"},"errors":{"contatti___date_time":[[]],"contatti___id":[[]],"contatti___nome":[[]],"contatti___cognome":[[]],"contatti___telefono":[[]],"contatti___email":[["Validazione fallita"]],"contatti___regione":[[]],"contatti___provincia":[[]],"contatti___comune":[[]],"contatti___indirizzo":[[]],"contatti___motivodelcontatto":[[]],"contatti___richiesta":[[]],"contatti___rowidsociete":[[]],"contatti___entity":[[]],"contatti___ragionesociale":[[]],"contatti___responsabile":[[]],"contatti___indirizzodealer":[[]],"contatti___comunedealer":[[]],"contatti___provinciadealer":[[]],"contatti___telefonodealer":[[]],"contatti___privacy":[[]],"contatti___privacy2":[[]],"contatti___emaildealer":[[]],"contatti___campagna":[[]]}}: TypeError: JSON.decode is not a function

    and this is the url:

    https://piscinedesjoyaux.it/media/com_fabrik/js/utils.js

    thank you for your help!
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    You have a bunch of JS errors coming from com_jchoptimize already on page load.
    Try to deactivate it (at least for any pages using Fabrik).
     
  7. lucfit

    lucfit New Member

    Level: Community
    Thank You. I've alredy tried to deactivate both component and module and refresh the cache (they are deactivated now) but I still get the error.
     
  8. troester

    troester Well-Known Member Staff Member

    Level: Community
    Something is throwing "Invalid token" which is not what utils.js is expecting.
    Your Joomla template is loading its own bootstrap and other JS. Did you try to use the standard Protostar template coming with Joomla?
    Magic? Nor any setting in Joomla, nor any setting in Fabrik,...?

    Try to disable your form elements, form plugins etc. and enable again one by one...
    Refresh Joomla and browser cache after any change...
     
  9. lucfit

    lucfit New Member

    Level: Community
    Hi, thank you for your help. Yes I alredy tried with Protostar but I get the same error.

    I also tried to disable elements, groups, plugins, joomla plugins and components but I still get the error even with a very basic configuration.

    This happened since I have updated joomla and fabrik to latest release.

    Thank you
     
  10. troester

    troester Well-Known Member Staff Member

    Level: Community
    This is not Allow fabrikDebug=yes but Allow fabrikDebug="Debug JS" (on your site it's still loading the minified Fabrik JS files so you didn't enable the "Debug JS")
    Did you update all Fabrik plugins?
    php version?
    Is it the same in the backend?

    It seems your form has still the autofill plugin enabled from which your were reporting issues in an other thread.
     
    Last edited: Sep 29, 2021
  11. lucfit

    lucfit New Member

    Level: Community
    After trying everything I moved the site to another hosting provider and found that although for days they replied that nothing had changed serverside, on the new provider the site works perfectly.
    I apologize and thank you for the usual support!
     

Share This Page