We are occasionally getting following fatal error (which doesn’t seem to affect everyday usage):
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function NgSurvey_Options::restore_revisions(), 1 passed in /var/www/html/wp-includes/class-wp-hook.php on line 309 and exactly 2 expected in /var/www/html/wp-content/plugins/ngsurvey/includes/init/class-ngsurvey-options.php:248
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(309): NgSurvey_Options->restore_revisions(124346)
#1 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#2 /var/www/html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#3 /var/www/html/wp-includes/revision.php(437): do_action('wp_restore_post...', 124346, 199991)
#4 /var/www/html/wp-admin/revision.php(70): wp_restore_post_revision(199991)
#5 {main}
thrown in /var/www/html/wp-content/plugins/ngsurvey/includes/init/class-ngsurvey-options.php on line 248
]]>
Hello again,
our error log is filled with these two notices:
PHP Notice: Trying to get property 'post_type' of non-object in /wp-content/plugins/ngsurvey/public/class-ngsurvey-public.php on line 69
PHP Notice: Undefined index: engine in /wp-content/plugins/ngsurvey/public/models/class-model-responses.php on line 319
Are these something we need to act upon, or can these be resolved in a future update of the plugin (we have version 1.0.8)? Thanks!
]]>Hello,
building on the previous topic we’re now trying to show the current survey stats after a user completes a survey. The problem we encountered is that the action hook “ngsurvey_survey_complete” appears not to be capable of changing the JSON response for the final page, whereas the filter hook “ngsurvey_end_of_survey_message” allows to change the final page, but doesn’t include the survey_id required to assemble the stats. Furthermore “ngsurvey_end_of_survey_message” is acted upon before “ngsurvey_survey_complete” so there is no way to combine them.
How to solve this conundrum? Thanks!
]]>Hello,
at the moment users are greeted only with a “thank you for your response” message after completing filling out a survey. Is there are way to optionally show them the current results of the survey instead? Thanks!
]]>Hello,
we don’t put the [ngsurvey id="123"]
shortcode in the page content but call it using do_shortcode()
. The current (version 1.0.5) result is that NgSurvey’s styles and scripts are not enqueued for inclusion in the page header. Can that be enforced programmatically? Or does this need fixing in the plugin? Thanks!
Hello,
currently tracking of completed surveys appears to be only based on IPs. We want to survey mostly logged-in users so we’d like the plugin to first check for that and only if not logged in for the IP. I.e. the same loggend-in user should never be able to complete a survey several times from different IPs, but completing the same surveys several times from the same IP but through different logged-in users needs to be possible.
Is such a feature in your plans? Thanks!
]]>Hello, using version 1.0.5. I’d like to programmatically execute ngsurvey shortcodes, so I do do_shortcode('[ngsurvey id="'.$id.'"]')
. Logs show following error message:
WordPress database error Unknown column 'r.ip_address' in 'where clause' in statement SELECT r.id, r.created_by, r.created_date_gmt, r.finished_date_gmt FROM wp_ngs_responses r INNER JOIN wp_ngs_tracking t ON r.post_id = r.id AND t.post_type = 2 WHERE survey_id = 100539 AND r.ip_address = '111.55.55.222' by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/sometemplate/single.php'), do_shortcode, preg_replace_callback, do_shortcode_tag, NgSurvey_CPT->handle_shortcode, NgSurvey_Controller_Survey->display, NgSurvey_Model_Responses->check_response
The SQL statement seems to not refer to t
correctly, like it should be ON t.post_id = r.id
and AND t.ip_address =
instead. Correcting that in NgSurvey_Model_Responses->check_response
makes the error go away.