1

Topic: Verification Form Warnings when editing

I'm using page category "Verification" and page type "Verification 4" but I've started getting this when I edit it;


    Strict warning: Declaration of iform_big_sea_survey::getEntity() should be compatible with iform_dynamic_sample_occurrence::getEntity(&$args, $auth) in require_once() (line 37 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/sites/all/modules/iform/client_helpers/prebuilt_forms/big_sea_survey.php).
    Strict warning: Declaration of iform_tree_sample_occurrence::getEntity() should be compatible with iform_dynamic_sample_occurrence::getEntity(&$args, $auth) in form_helper::prebuilt_form_picker() (line 68 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/sites/all/modules/iform/client_helpers/form_helper.php).

I'm guessing something is not right with the code as it seems to thing its a Big Sea Survey. Something of which I know nothing. Does anyone else know why a generic verification form thinks it is a Big Sea Survey?

Data Manger
Somerset Environmental Records Centre

2

Re: Verification Form Warnings when editing

Hi Tony

When you edit the form I expect the code touches all the available forms that exist in the system. Probably you will see this whatever Indicia form you edit. The warning (there are two warnings about the same fundamental issue from two different places) is about the way a function is declared.

It looks like a change in a parent class has not been propagated to child classes.
https://github.com/Indicia-Team/client_ … bc4eebfd9a

I've raised an issue https://github.com/Indicia-Team/client_ … /issues/39

Since you are certainly not using the Big Sea Survey form and are probably not using the Tree Sample Occurrence form I am optimistic that your site will function as normal while this is being fixed. If you think not, let us know and we'll sort something out.

Jim Bacon

3

Re: Verification Form Warnings when editing

Hi both
I've fixed the issue in the code. Jim is correct though - the warnings will only occur when editing a page and won't affect normal users.
Regards
John

John van Breda
Biodiverse IT

4

Re: Verification Form Warnings when editing

Thanks guys. Of course having updated the code I have other issues.


    Strict warning: Declaration of iform_dynamic_progressive_seasearch_survey::get_submission() should be compatible with iform_dynamic_sample_occurrence::get_submission($values, $args) in form_helper::prebuilt_form_picker() (line 68 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/sites/all/modules/iform/client_helpers/form_helper.php).
    Strict warning: Declaration of iform_earthwormwatch_sample_occurrence::get_submission() should be compatible with iform_dynamic_sample_occurrence::get_submission($values, $args) in form_helper::prebuilt_form_picker() (line 68 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/sites/all/modules/iform/client_helpers/form_helper.php).

Don't know if its related but I can no longer load form settings for verification forms. Recommended forms do not exist but I cant remember if that was always the case. It's been a long time since I created a form.

Data Manger
Somerset Environmental Records Centre

5

Re: Verification Form Warnings when editing

That's frustrating. Those are errors almost identical in nature to the previous ones.

They are saying the the declaration of the function get_submission() is not consistent across three files in the folder modules/ifrom/client_helpers/prebuilt_forms

These files are
- dynamic_sample_occurrence.php
- dynamic_progressive_seasearch_survey.php
- earthwormwatch_sample_occurrence.php

One of these problems was fixed a year and a half ago
https://github.com/Indicia-Team/client_ … 00da8da73d
While the other was fixed a year ago
https://github.com/Indicia-Team/client_ … a6adb9fb81

It seems to me that your client_helpers library is in a peculiar state - somewhat out of date and not entirely consistent. Do you use a Git client for updates? That is what we do as it helps to manage the application of updates to ensure every file is at the correct version. SourceTree is what I use.

You can double check my interpretation by looking in the three files, searching for the declaration of get_submission() and confirming whether, in each case, it looks like

public static function get_submission($values, $args, $nid)

Compare with

https://github.com/Indicia-Team/client_ … rrence.php
https://github.com/Indicia-Team/client_ … survey.php
https://github.com/Indicia-Team/client_ … rrence.php

Jim Bacon.

6

Re: Verification Form Warnings when editing

Thanks Jim, I downloaded the latest client helpers 1.28.1 yesterday and uploaded all the files. It appears, and I have no explanation for it that dynamic_sample_occurrence.php was still the version without the $nid argument.

The date on the server is correct and the permissions so as I had no error reported... I may have to change client for uploads in future. I use dreamweaver for all the css uploads but file dumps, generally, an ftp client.

The whole set has been reuploaded this morning and seems to have fixed all but the problem of the verification map being off to the right of the report and that is with a new verification form I created yesterday out of the box.

However Verification 4 is no longer recommended and only 5 is. I get no map, no verification filters [filter bar still visible & working] and the verification buttons do not work when I view the page. Something that is consistent with yesterday, though my verification 4 forms now have the verify buttons working.

The only indication by the system I get is if I create a new verification page [5] don't save but preview after loading the settings.


    Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 175 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/includes/entity.inc).
    Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 388 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/includes/entity.inc).
    Notice: Trying to get property of non-object in _entity_iframe_view_iframe() (line 339 of /homepages/29/d147710548/htdocs/drupal.somerc.co.uk/sites/all/modules/entity_iframe/entity_iframe.module).

At this point no maps have been turned on but that is all.

Data Manger
Somerset Environmental Records Centre