WordPress.org

Ready to get started?Download WordPress

Forums

FAQ Builder
"Error Occured" and messy JS (6 posts)

  1. tim@dualmediasolutions.com
    Member
    Posted 3 years ago #

    The plugin is an awesome concept, and clearly a lot of work has gone into this.

    There are two issues going on here though.
    1) I'm getting the error "An error occured while submitting. Please reload the page and try again."
    As far as I can see, there is no error.
    This happens when I try searching, (and it still searches) and also while submitting a question (and the submission still goes through.) Which means everything is functioning fine, it is just throwing false alarms.
    I see that the alerts are located in the "javascript.php" file.
    For now I have commented them out.

    2) This plugin puts a TON of javascript in the page itself, on every single page. It should be an easy fix to get around this, by including the JS as an external file.

  2. bestjimmy
    Member
    Posted 2 years ago #

    Tim,

    Would you be able to throw up a screenshot or something that shows exactly what/how you commented out the alerts in the javascript.php file. Would be super helpful for me.

    Thanks!

  3. mneil
    Member
    Posted 2 years ago #

    This plugin has a lot of issues semantically as well. It's just ugly code. But, it works; sort of. The problem seems to be that no matter what the requests.php is returning status 404 which SACK fires the onError for anything other than a request 200. They should switch to wp_ajax_nopriv and get rid of requests.php entirely. I'd also like to see a nonce used instead of their makeshift ID validation.

    Anyway, I know it's been 3 months but quick fix: comment lines:

    27
    48
    59

    of javascript.php

    They need to also get rid of that file file or switch it to just JS because it never caches and it's a cumbersome file. The whole returning JS kinda sucks too. Anyway, the plugin does work and it's easy for clients to use on the back-end.

  4. photogirl79
    Member
    Posted 2 years ago #

    Alright well, I'm having the same problem. However, I have to say that I have done a very thorough extensive search and there is no other "Faq" Builder that meets my business needs as this one does. It's sad, but true.

    I just need a way to figure out how to comment out the error messages without upsetting the rest of my website. Every time I comment out the above referenced lined, my whole site starts to break. Please, does anyone have a solution to get this working without destroying the rest of the site? What did you do? Can you post an example of how you tweaked the code specifically? Please let me know, as any help would be greatly appreciated.

  5. BehindTheThrills
    Member
    Posted 2 years ago #

    I know this topic is kind of old, but I had the same problem and I found a slight problem in the coding. I changed one line of code to thank my visitor for submitting a question rather than it coming up with an error but still providing thank you text on the page. To fix this, look for a line of text like the following in the javascript.php file:

    mysack.onError = function() { alert('An error occured while submitting. Please reload the page and try again.') };

    You will see several of these in the coding, but I only changed the first one. Change the text between the ' ' to whatever you want your visitor to see. Example:

    mysack.onError = function() { alert('Thank you for your question!') };

  6. rsjeyakumar
    Member
    Posted 2 years ago #

    Thanks for giving this plugin in Open source.i have used this plugin on of my client , when i click ASK button i got one alert box ,It show "An error occured while submitting. Please reload the page and try again."
    I google it.. but i can't find solution, finally i get idea. its wordpress comparability issue.

    Please follow these steps..

    1.go to requests.php file
    2.Changing "require('../../../wp-blog-header.php');" to "require('../../../wp-load.php');" at the start of the script
    fixed it.

    More solution visit this link
    Then it will work fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic