Support » Plugins and Hacks » [Plugin: WP Survey And Quiz Tool] Cannot activate…missing required file Widget.php

[Plugin: WP Survey And Quiz Tool] Cannot activate…missing required file Widget.php

  • I just downloaded and tried to activate this plugin but am receiving a fatal error.

    Fatal error: require_once() [function.require]: Failed opening required '/my_site_path/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Widget.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /my_site_path/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Core.php on line 43

    Core points to Widget.php on this line and the file does not exist in the Wpsgt directory. Was the Widget.php file overlooked on the last commit?

    FYI, I substituted ‘my_site_path’ instead of using my actual path.



Viewing 15 replies - 1 through 15 (of 38 total)
  • I got the same error.

    This was on WP 3.1.4 MultiSite.

    I can activate now but I get different errors.

    When I try to edit or delete questions, I get the error: No such Wpsqt_Page_Main_Questionedit_Poll class

    I haven’t tried this on WP 3.2.1 or WP 3.2.1 MS.

    Plugin Author Ollie Armstrong


    Please download version 2.4 as I have just checked and that definitely contains the widget class.

    Ronbme, are you editing the questions on a poll? If so then I must have just forgotten to commit those classes. If they are quizzes or surveys then there is a big issue somewhere that I am not getting but you are.


    Ollie, yes it was on a poll. I upgraded to ver. 2.4.1 this morning and it seems to be working now.


    Plugin Author Ollie Armstrong


    Yeah, I was getting those errors too, just forgot to upload the classes. Should be all okay with 2.4.1+.


    I just got a new error. This was in a poll.

    The error is: Warning: Invalid argument supplied for foreach() in \wp-survey-and-quiz-tool\pages\admin\poll\result.php on line 26

    I did an upgrade after installing ver. 2.4.1. and it added a column. Then I took the test poll again and still got the same error.

    I just created a second poll and I’m getting the same error.

    Plugin Author Ollie Armstrong


    Sorry I should be more specific, but in future don’t use the upgrade pane. Its crap and it doesn’t work. Will get round to rewriting it eventually.

    That’s a strange error, basically I think its because it wasn’t working before and it still hasn’t added the data to the session variable. Creating a new poll should fix this. Also I have just pushed another minor update which should fix a couple more bugs in the poll system.


    Thanks. I’ll download it and give it a try. I won’t use the Upgrade.

    Plugin Author Ollie Armstrong


    Okay, let me know. I think I will remove the upgrade tab altogether.

    Ollie, just tried the poll several times. Now I get the same results error but it is on line 31.

    I just found another error on surveys. “Single results” works. “Total results” produces the following error: Warning: Invalid argument supplied for foreach() in \wp-survey-and-quiz-tool\pages\admin\surveys\result.total.php on line 8

    I think you’re getting closer. There are a couple of other things but they’re mainly cosmetic.

    Plugin Author Ollie Armstrong


    Okay, could you add the line
    below line 20 and then paste me the output before the warning?


    Ok. Will do.

    It is: string(21) “Favorite Reality Show”.

    Plugin Author Ollie Armstrong


    Right, that seems okay.

    Can you paste
    echo '<pre>'; var_dump($_SESSION['wpsqt'][$pollName]['sections']); echo '</pre>';
    before line 31 and give me the output?
    Should be quite a lot, you might want to paste it to pastebin.com and share the link here.


    Sorry, I had to help someone upgrade their computer.

    I get a NULL and the same error.

    Plugin Author Ollie Armstrong


    No worries.

    For some reason it isn’t setting the correct session variable. If it is possible, could you follow these steps just to make sure everything’s reset.

    1. Use the backup tab in maintenance to backup all wpsqt tables
    2. Download the backup
    3. Delete the wp-survey-and-quiz-tool directory
    4. Delete all wpsqt tables
    5. Re upload the latest version of the plugin (2.4.2)
    6. Recreate a poll and test it

    Sorry that its such a hit and miss procedure, but something isn’t quite working on your install and it is on mine. If you are comfortable in PHP then feel free to have a play and try to debug it. If you can fix it then I will add the fix in.


    EDIT: Just re-read and noticed you are on multisite. I will set up a multisite network and see if I get the same error.

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘[Plugin: WP Survey And Quiz Tool] Cannot activate…missing required file Widget.php’ is closed to new replies.