Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jul 2015 at 10:48 UTC
Updated:
24 Aug 2015 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Tom.W commentedpatch attached which implements the above suggestion
Comment #2
danchadwick commentedYou are right that the call is incorrect.
1) Your call isn't quite correct. The third parameter should be array() since the message has not yet been translated.
2) I copied this from somewhere else, which means that I bet there are other calls in the codebase that need checking.
3) Recent commits copied the code above, so there are at least two more problems in the conditionals file.
Thanks for your help.
Comment #3
danchadwick commentedCouldn't find the source of the bad copied code. Odd.
I updated the call and fixed the other places in Conditionals.
QUESTION: Why did this happen? This should never happen in normal execution of Webform.
Committed to 7.x-4.x and 8.x.
Comment #6
LeafLin commentedThanks for providing the solution here. It's works nicely.
I believe the error message "WebformConditionals::componentMarkup called prior to evaluating a submission." comes up every time when I navigate between my multipage webform when the page has a markup component.
The markup component can be set to display on "form only" or "viewed submission only" or both. And I guess this is where the error comes from. Although it doesn't seem to cause any other problems..
Any comment is appreciated!!
Comment #7
danchadwick commentedExcellent. This is a new issue, which I created.
Comment #8
Rob T commentedThanks for the fix and commit. This was a headscratcher to deal with as the dblog at /admin/reports/dblog was returning only a single message:
Fortunately I bumped into this thread (https://www.drupal.org/node/1279680), which helped me get my dblog back before leading me here.
I'll post the particulars of what's generating my "WebformConditionals::componentMarkup called prior to evaluating a submission." in the new issue you created, Dan: https://www.drupal.org/node/2542796
Thanks again.
Comment #9
ptocco commentedI was having a problem viewing the Log Messages under Reports, then I found a solution on this page. Using the instructions at the top, I got my Log Messages back. I searched with Dreamweaver and found the code in webform/webformconditionals.inc. Anway, today I was continuing to troubleshoot why Webform was not sending emails. The Reports/Log Messages page was working fine until I selected a Filter to search only Webform issues. Then the previous error message came back and all log messages went away:
Recoverable fatal error: Argument 2 passed to t() must be of the type array, string given, called in /var/www/html/modules/dblog/dblog.admin.inc on line 295 and defined in t() (line 1459 of/var/www/html/includes/bootstrap.inc).
So at that point I searched out the code block to check if it's still there:
watchdog('webform', 'WebformConditionals::componentVisibility called prior to evaluating a submission.', NULL, WATCHDOG_ERROR);
And it was, just as I had left it. So now it seems the patch no longer works for me.
On a good note I have fixed Webform's email by installing the SMTP mail system. However I would very much like to be able to see Drupal's Log Messages.
Does anybody have any insights? Much appreciated. Thanks in advance.
Comment #10
danchadwick commentedRealize that the patch won't fix existing errant entries in the log. I suggest you use a SQL tool like PhpMyAdmin to delete the webform entries from the watchdog table.