• Love the plugin – it so nearly works perfect
    Have latest version Version: 2.5.2 on WordPress 3.2.1.

    2 errors i receive using the survey
    After a completion of quiz the instant email is sent to my inbox
    I click the link ….comwp-admin/admin.php?page=wpsqt-menu&section=results&subsection=mark&id=3

    But it shows an error Warning: Division by zero in /home/human/public_html/wp-content/plugins/wp-survey-and-quiz-tool/pages/admin/results/mark.php on line 121

    and accross the top i get
    No such Wpsqt_Page_Main_Edit_Mark class
    No such Wpsqt_Page_Main_Sections_Mark class
    etc

    any ideas Ollie?

Viewing 15 replies - 31 through 45 (of 67 total)
  • I upgraded from a previous version. I’ll try out your fix.

    Plugin Author Ollie Armstrong

    (@olliea95)

    Word of advice, if you download from GitHub you will have to rename the directory to wp-survey-and-quiz-tool or the javascript doesn’t work.

    Ollie

    Plugin Author Ollie Armstrong

    (@olliea95)

    Also, if nothing is working then deactivate then reactivate. Occasionally it doesn’t create the tables on install.

    Thread Starter zanet

    (@zanet)

    ok initially it had issues

    but then after a further deactivate then reactivate it WORKS!

    There is a constant reminder in red “An upgrade is required. Click here to proceed to upgrade.”

    But i guess that any easy fix

    Great News Ollie, any good for you astechsolutions?

    Plugin Author Ollie Armstrong

    (@olliea95)

    Brilliant. Stupid question but have you actually tried to do the upgrade it asks for? Should only make sure that the tables are correct.

    Ollie

    Thread Starter zanet

    (@zanet)

    I didnt on this new version – just in case – but i will now try it

    Thread Starter zanet

    (@zanet)

    Yes updated – still works a dream

    This is the real deal! Best Survey Quiz Plugin for WordPress by a mile!

    Plugin Author Ollie Armstrong

    (@olliea95)

    Brilliant, knew I would get there! Haha.

    Any other issues please report them and I will get onto fixing as soon as I can.

    Hi Ollie,

    great job with the plugin. Have been trying to make it work from yesterday and thanx good I have found this thread. Your new 2.5.4 upgrade is working fine now. I only have one issue. I am using characters like “?????yáí” and those are being replaced everytime I edit my question or anything and after that they are not readable. I found out, that this is caused by htmlentities() functions. I had to insert two options at the end so the functions looks like this: htmlentities(stripslashes($option[“value”]), ENT_COMPAT, ‘utf-8’). I guess that this way we are forcing UTF-8 encoding and that probably wont work for everyone, but is there a way to make it optional. You could make it like this: htmlentities(stripslashes($option[“value”]), ENT_COMPAT, DB_CHARSET) — which is wordpress database installation encoding.

    Or if you have a better solution please let me know. I just dont want to constantly overwrite your files after upgrade.

    Stefan

    Plugin Author Ollie Armstrong

    (@olliea95)

    Yes thats possible. I recently changed the database collate to UTF8 so it could support international characters but I must have overlooked that htmlentities uses ISO-8859 by default. Will look at changing them all and releasing this in the next update.

    Cheers,
    Ollie

    That would be awesome. You rock.

    Also one more thing. I would the functionality to pull poll results right after submission with AJAX. Maybe adding

    add_action('wp_ajax_POLL_RESULT_FUNCTION', 'POLL_RESULT_FUNCTION');
    add_action('wp_ajax_nopriv_POLL_RESULT_FUNCTION', 'POLL_RESULT_FUNCTION');

    would do the trick without a big code change.

    Let me know. Thanx.
    Stefan

    I had to uninstall and lose all my 3 quizzes ??

    But the results are saved just fine now ??
    I’ve taken a backup of the db before I uninstalled the plugin from the wpsqt backend – is there a way I can import questions results and answers from the backup?

    Plugin Author Ollie Armstrong

    (@olliea95)

    Been looking at doing this for a while but I’m crap with AJAX/JS etc.. If that works you are an absolute star.

    Ollie

    Plugin Author Ollie Armstrong

    (@olliea95)

    Astech, the backup should give you one file. If you go into PHPMyAdmin and just import it, everything should work fine.

    Ollie

    Hey Ollie, if it wont work for the first time try to do it this way:

    1) I guess you have an existing function and lets call it POLL_RESULTS() .. in my case, I could not connect AJAX directly to this function so I had to create a functions called AJAX_POLL_RESULTS() and it looked like this:

    function ajax_poll_results(){
     die( poll_results() );
    }

    2) Now you can create the ajax hooks like this:

    add_action('wp_ajax_ajax_poll', 'ajax_poll_results');
    add_action('wp_ajax_nopriv_ajax_poll', 'ajax_poll_results');

    Where ajax_poll in the ajax hook is the parameter, that needs to in AJAX call when called from the template. So now, the ajax call needs to look like this:

    $('#poll-submit').click(function() {
    	jQuery.post(
    		'<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php',
    		{ 'action':'ajax_poll' }, // this is the action name
    		function(response){
    			$('#poll-holder').html( response );
    		}
    	);
    	return false;
    });

    Hope this helps .. I have spent few hours until I got this clear the last time I tried to convert one of my WP functions into ajax.

    If I can help with anything just let me know.

    Thanx.
    Stefan

Viewing 15 replies - 31 through 45 (of 67 total)
  • The topic ‘2 errors i receive using the survey’ is closed to new replies.