We tried updating webform from beta16 to beta17 this morning using drush up (drush version 8.1.12) in our Drupal (core 8.3.7)

This resulted in the following message(s) in the database updates:

The following updates are pending:

webform module :
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element descriptions as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.

Do you wish to run all pending updates? (y/n): y
env COLUMNS=189 /usr/bin/drush --backend=2 --user=0 --verbose --yes --root=/var/www/natarch --uri=http://default updatedb-batch-process 332860 2>&1 [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_HL2RqG --database=natarch --host=localhost --port=3306 --silent < /tmp/drush_XD00CH
Executing: mysql --defaults-extra-file=/tmp/drush_zrxacE --database=natarch --host=localhost --port=3306 --silent < /tmp/drush_XpMsjF
Executing webform_update_8072 [notice]
Argument 1 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of [error]
Drupal\Core\Extension\ModuleHandler given, called in /var/www/natarch/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 and defined
WebformTokenManager.php:46
Argument 2 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Extension\ModuleHandlerInterface, instance of Drupal\token\Token [error]
given, called in /var/www/natarch/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 and defined WebformTokenManager.php:46
Argument 3 passed to Drupal\webform\WebformTokenManager::__construct() must be an instance of Drupal\Core\Utility\Token, none given, called in [error]
/var/www/natarch/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 and defined WebformTokenManager.php:46
Undefined variable: token WebformTokenManager.php:49 [notice]
PHP Fatal error: Call to undefined method Drupal\Core\Extension\ModuleHandler::get() in /var/www/natarch/modules/contrib/webform/src/WebformTokenManager.php on line 51

Fatal error: Call to undefined method Drupal\Core\Extension\ModuleHandler::get() in /var/www/natarch/modules/contrib/webform/src/WebformTokenManager.php on line 51
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined method Drupal\Core\Extension\ModuleHandler::get() in /var/www/natarch/modules/contrib/webform/src/WebformTokenManager.php, line 51
The external command could not be executed due to an application error. [error]

PHP version: 5.6.31
Command line used: drush up webform -vy

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

henrikar created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
FileSize
497.11 KB

Have you implemented or are using a custom webform handler?

If Yes, the WebformHandlerBase::__construct method has been updated.

http://cgit.drupalcode.org/webform/tree/src/Plugin/WebformHandlerBase.ph...
http://cgit.drupalcode.org/webform/tree/src/Plugin/WebformHandlerBase.ph...

henrikar’s picture

We are indeed using a custom webform handler. We are currently looking into whether this is indeed the cause.

We are not using this code directly, but maybe indirectly via RemotePostWebformHandler

henrikar’s picture

Status: Needs review » Closed (works as designed)

We fixed the code of our custom webform handler. The error is now gone.

jrockowitz’s picture

Status: Closed (works as designed) » Fixed

Changing this to fixed so that it can appear in the issue queue for 2 weeks.

lomale’s picture

Status: Fixed » Active
FileSize
60.41 KB
27.55 KB

I have the same problem on a working site. I tried to update to beta17 via UI update extension and have a crash -

see picture

now the site is not available anymore.

What can I do except going back to the backup version

Thanks
Lothar

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

Simply put, if you install and use the Webform module out of the box AS-IS, you should be okay. Once you start extending webforms with plugins, altering hooks, and overriding templates, you will need to read each release's notes and assume that things will be changing.

FROM: https://www.drupal.org/node/2834423


If any code in the Webform module is causing this issue, I will immediately fix it and tag a new release.

Right now, it seems that only custom Webform handlers, which need to be updated, are causing the issue.

LaravZ’s picture

Hi Lothar,

Have you checked whether any of your custom (or contrib) code extends either WebformHandlerBase, BrokenWebformHandler, DebugWebformHandler, EmailWebformHandler, or RemotePostWebFormHandler? If so, the constructor might additionally need WebformSubmissionConditionsValidatorInterface. LoggerInterface also has been replaced with LoggerChannelFactoryInterface.

Setting these things right fixed it for me.

lomale’s picture

I have a Problem that I even don't get back to the site. so I can't even look what happens. I have to make a backup recovery.
Thanks anyway
Lothar

jrockowitz’s picture

There is another issue related to the update hooks.

@see #2908014: Update to beta17 fails, but is recoverable with Drush

deuteron’s picture

@ #9

- manually add the patch from #2908014: Update to beta17 fails, but is recoverable with Drush

- run update.php

should get your site back running.

Stephen Ollman’s picture

Running update.php fixed the issue for me and I was able to access my site again.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
BlinX’s picture

Restored BackUp with 8.x-5.0-beta13 (27/8/2017) : website is OK

Updated Webform to 8.x-5.0-beta18:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Extension\ModuleHandler given, called in /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 in Drupal\webform\WebformTokenManager->__construct() (line 46 of modules/webform/src/WebformTokenManager.php).

I updated in the Drupal admin, not Drush!

I assume Claring cache from patch in #2908014 is not necessary because this is in beta18 !??

What can I do?
Rolf

jrockowitz’s picture

You need to fix the constructor of custom or contrib WebformHandler.

There is a report that lists all your install handlers. The path for beta 16+ is /admin/structure/webform/plugins/handlers

lomale’s picture

Sorry Jake how do I fix that over the UI

Right now, it seems that only custom Webform handlers, which need to be updated, are causing the issue.
where are they located and where do i get them from

I know; not enough knowhow
I appreciate a hint

Lothar

jrockowitz’s picture

What webform add-one modules do you have installed?

Search your code for @WebformHandler and any file that is outside the /webform directory is the problem.

lomale’s picture

FileSize
105.85 KB

my handlers

lomale’s picture

FileSize
94.2 KB
122.69 KB

and the rest

lomale’s picture

FileSize
88.7 KB
117.45 KB

in total i found 7 see picture 1
the first 4 are in picture 2
1 is in picture 3
and 2 are in picture 4

lomale’s picture

FileSize
121.16 KB
123.32 KB
BlinX’s picture

restored website to backup with 8.x-5.0-beta13
Updated to 8.x-5.0-beta18

.../core/authorize.php
Gave this:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Extension\ModuleHandler given, called in .../public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 in Drupal\webform\WebformTokenManager->__construct() (line 46 of modules/webform/src/WebformTokenManager.php).

So updating in Drupal admin is not possible to beta16, only to latest version.

restored website to backup with 8.x-5.0-beta16
Try to go to /admin/structure/webform/plugins/handlers but this page does not exist!

The link to the tab "Plugins" in /admin/structure/webform is:
/admin/structure/webform/settings/elements but gives error!

jrockowitz’s picture

Now, it is starting to look like the TokenManager::__construct changed between releases.

Does clearing the cache via drush before running the updates help?

We might be able to replicate the issue by installing beta16 and trying to do the update to beta18 via the UI.

lomale’s picture

Thats what I reported in the issue

https://www.drupal.org/node/2908949

I updated from beta16 to beta 18

lomale’s picture

FileSize
101.55 KB

  • jrockowitz committed 7ab6417 on 2907960-beta17-unrecoverable-error
    Issue #2907960 by lomale, jrockowitz, henrikar, BlinX, LaravZ, deuteron...
jrockowitz’s picture

Here are my steps to reproduce the error while still being able to update from beta16 to beta18...

  • Install beta16 (git checkout 8.x-5.0-beta18, download zip, use drush, etc..)
  • Login to Drupal
  • Go to the Contact form, this just makes sure that the webform module is loaded (/form/contact)
  • Switch to beta18 (git checkout 8.x-5.0-beta18)
  • Go to any page on your website
  • Confirm that there is an error message "TypeError: Argument 1 passed to Drupal\webform\WebformTokenManager::__construct()"
  • Go to the update page (/update.php)
  • Run the database updates
  • Go to any page on your website
  • Confirm that there is no error message and the website loads fine

Yes, the error is happening because a key API has changed but we are able to go to /update.php (or drush), run all the pending updates, and the website works fine.

This error is occurring because of the \Drupal\webform\Twig\TwigExtension, which is loaded on every page, is dependant on WebformTokenManager which has been updated.

Here is the major issue, while switching from beta16 to beta18 you should always switch to maintenance mode but this is also broken.

The long term solution is going to remove the dependency injection from \Drupal\webform\Twig\TwigExtension. (see the attached 2907960-beta18-hotfix-01.patch) I will be applying the patch to 8.x-5.x.

There is no immediate solution/patch, there are two work arounds to suppress this error.

OPTION 1: Apply the attached hotfix 2907960-beta16-hotfix-01.patch, clear your cache and then switch to beta18.

OPTION 2: Immediately after switching to beta18, run /update.php. Yes, the error message will briefly appear on your website.

For a large enterprise website where people will notice the error message, I would suggest OPTION 1.

Finally, I just want to give credit to everyone who worked on /update.php because even though there is a major Webform API change it is still working as expected.

BlinX’s picture

jrockowitz, first many thanks for your help!
Unfortunately its not working for me right now.
This is the log of what I did:

According to your steps:
Started with working website with 8.x-5.0-beta13
Went to the Contact form (/form/contact). However, I have no clue what to do there.
Downloaded 8.x-5.0-beta16.zip uploaded to Modules
Refreshed the Contact form (/form/contact)
Got this message: "The website encountered an unexpected error. Please try again later."
Went to mydomain.nl/update.php
22 updates available
Message: "The website encountered an unexpected error. Please try again later." (Blank screen with this error)
Went 2 screens back: 11 updates :
webform module

8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.

It was not possible to get along with updating these.
Went to mydomain.nl that was possible
Went to the Contact form (/form/contact); message: "Er is onverwacht een fout opgetreden. Probeer het later nog eens." (Blank screen with this error)
Updated from 8.x-5.0-beta16 to 8.x-5.0-beta18 with UI
Error message (Blank screen with this message): "TypeError: Argument 1 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Extension\ModuleHandler given, called in /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 in Drupal\webform\WebformTokenManager->__construct() (line 46 of modules/webform/src/WebformTokenManager.php)."

Went to mydomain.nl/update.php
16 updates available:
webform module

8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element description as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.
8076 - Issue #2908080: Allow options single and multiple format to be specified during export.

Error message: "The website encountered an unexpected error. Please try again later."

Next I tried:
Started with working website with 8.x-5.0-beta13
Uploaded 8.x-5.0-beta16 to Modules
Ran update.php
22 updates available
The website encountered an unexpected error. Please try again later.

After running update.php able to get in (part of admin)

Updated from 8.x-5.0-beta16 to 8.x-5.0-beta18 with UI
Message: "The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\webform\WebformTokenManager::__construct() must implement interface Drupal\Core\Config\ConfigFactoryInterface, instance of Drupal\Core\Extension\ModuleHandler given, called in /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 in Drupal\webform\WebformTokenManager->__construct() (line 46 of modules/webform/src/WebformTokenManager.php)."

Ran update.php
16 updates available
webform module

8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element description as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.
8076 - Issue #2908080: Allow options single and multiple format to be specified during export.

Message: "The website encountered an unexpected error. Please try again later."

Let me know if you need other info, or maybe even the adminlogin of this site, so you try yourself!?
Cheers,
Rolf

jrockowitz’s picture

Here are my beta13 upgrade steps using the UI...

  • Installed Drupal 8.3.x with Webform 8.x-5.0-beta13
  • Login as root
  • Confirm Webform 8.x-5.0-beta13 is installed (/admin/modules)
  • Go to /update.php
  • Download Webform 8.x-5.0-beta18
  • If you go to any page other than /update.php the website will be broken.
  • Run all 27 pending updates (see attached screenshots)
  • Confirm that your website is now loading without any problems.

If you use Drush (http://www.drush.org/en/master/) this update process is so much easier with much less downtime.

Here are my beta13 upgrade steps using Drush...

Starting with Drupal 8.3.x with Webform 8.x-5.0-beta13. I did not even bother to uninstall webprofiler.
IMPORTANT: Drush throws an error if you don't clear cache before running the database update so I am not using `drush up`

# Go to your Drupal site's root directory.

# Check webform project info. It should display 8.x-5.0-beta13.
drush pm-projectinfo webform

# Update only the webform module
drush -y --no-core pm-updatecode webform

# Clear cache to make sure all update hooks will execute.
drush cache-rebuild

# Check webform project info.
drush pm-projectinfo webform

# Run the pending database updates.
drush -y updb

BlinX’s picture

jrockowitz, I tried UI procedure:
Systemname: webform
Versie: 8.x-5.0-beta13

Went to https://mydomain.nl/update.php

Want's to check how many db updates are there with 8.x-5.0-beta13 still in place, so I hit "Continue"...
Error message: "The website encountered an unexpected error. Please try again later."

Ignored that, Went to https://mydomain.nl/update.php again;
Downloaded webform 8.x-5.0-beta18.zip
Uploaded to folder modules

Hit "Continue" at https://mydomain.nl/update.php
27 updates available
webform module

8050 - Issue #2856472: Allow multiple drafts per users.
8051 - Issue #2885183: Add support for customized webform submission labels.
8052 - Issue #2886173: Ability to have no empty option on a select element.
8053 - Issue #2757491: Allow Webforms to be submitted using AJAX.
8054 - Issue #2886853: Ability to customize user draft and submission columns.
8055 - Issue #2887078: Allows preview page to customized.
8056 - Issue #2887443: Default to and from email settings missing and not used.
8057 - Issue #2854021: Send email based on element options selection.
8058 - Issue #2888076: Redirect users to login page when trying to access the a protected webform file.
8059 - Issue #2888850: Validate source entity that passed as URL parameters.
8060 - Issue #2888615: Allow preview to exclude elements.
8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element description as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.
8076 - Issue #2908080: Allow options single and multiple format to be specified during export.

Hit "Apply pending Updates"
Error message: "The website encountered an unexpected error. Please try again later."

So unfortunatly it won't work at my side/site...

Can it be the error with update.php in the beginning, with beta13 still installed is the problem? And how can I check what the problem issue is??

jrockowitz’s picture

I need to know what the exact error is to be able to diagnose the problem. You will need to look at the Recent log messages.

Can you try upgrading to beta 15 or 16 before upgrading to beta 18.

jrockowitz’s picture

I am also willing to bet that if you used drush to run updates the error would be displayed.

BlinX’s picture

I do believe you when you say Drush would be easier... I just looked at the link you gave, and I am lost already.
I have to learn Drush, but first want to get on with the problem site.

Last message in the log is an error: "InvalidArgumentException: Class "\Drupal\webform\Access\WebformAccess" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (regel 24 van /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php)."

The one before that one is:
"Drupal\Component\Plugin\Exception\PluginNotFoundException: The "entity:poll" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (regel 52 van /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php) #0 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(25): Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition(Array, 'entity:poll', true) #1 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('entity:poll') #2 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(84): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('entity:poll', Array) #3 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(810): Drupal\Component\Plugin\PluginManagerBase->createInstance('entity:poll') #4 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row') #5 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(813): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\views\Plugin\views\display\Page), Array) #6 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/ViewExecutable.php(871): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style') #7 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/ViewExecutable.php(1828): Drupal\views\ViewExecutable->initStyle() #8 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/Plugin/views/display/PathPluginBase.php(132): Drupal\views\ViewExecutable->getTitle() #9 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/Plugin/views/display/PathPluginBase.php(220): Drupal\views\Plugin\views\display\PathPluginBase->getRoute('poll_list', 'page_1') #10 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object(Symfony\Component\Routing\RouteCollection)) #11 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes() #12 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array) #13 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #14 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/includes/common.inc(1141): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #15 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/system/src/Controller/DbUpdateController.php(650): drupal_flush_all_caches() #16 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/includes/batch.inc(414): Drupal\system\Controller\DbUpdateController::batchFinished(true, Array, Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup)) #17 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/includes/batch.inc(81): _batch_finished() #18 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/modules/system/src/Controller/DbUpdateController.php(186): _batch_page(Object(Symfony\Component\HttpFoundation\Request)) #19 [internal function]: Drupal\system\Controller\DbUpdateController->handle('start', Object(Symfony\Component\HttpFoundation\Request)) #20 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/Update/UpdateKernel.php(110): call_user_func_array(Array, Array) #21 /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/Update/UpdateKernel.php(73): Drupal\Core\Update\UpdateKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request)) #22 /home/schaveren/domains/onsmooischaveren.nl/public_html/update.php(28): Drupal\Core\Update\UpdateKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #23 {main}."

Hope you can help!
Cheers,
Rolf

jrockowitz’s picture

Are you updating other modules at the same time? The Webform module does not provide the poll entity.

BlinX’s picture

Indeed it seems an old instance of Poll was interferring.
I just did this:

Before I installed Poll module and removed it again.
Error log seems there are problems with Poll

Installed module Poll again
Error on switching Poll on
Message was about 2 views Poll things
Removed these
No problem with update.php

Again uploaded beta18
Ran update.php

27 updates:
webform module

8050 - Issue #2856472: Allow multiple drafts per users.
8051 - Issue #2885183: Add support for customized webform submission labels.
8052 - Issue #2886173: Ability to have no empty option on a select element.
8053 - Issue #2757491: Allow Webforms to be submitted using AJAX.
8054 - Issue #2886853: Ability to customize user draft and submission columns.
8055 - Issue #2887078: Allows preview page to customized.
8056 - Issue #2887443: Default to and from email settings missing and not used.
8057 - Issue #2854021: Send email based on element options selection.
8058 - Issue #2888076: Redirect users to login page when trying to access the a protected webform file.
8059 - Issue #2888850: Validate source entity that passed as URL parameters.
8060 - Issue #2888615: Allow preview to exclude elements.
8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element description as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.
8076 - Issue #2908080: Allow options single and multiple format to be specified during export.

This went better than before!
Log message:
webform-module
#8061 bijwerken
Mislukt: Drupal\Core\Database\SchemaObjectExistsException: Tabel webform bestaat al. in Drupal\Core\Database\Schema->createTable() (regel 594 van /home/schaveren/domains/onsmooischaveren.nl/public_html/core/lib/Drupal/Core/Database/Schema.php).

(In English: Webform Table already exists)

jrockowitz, Do you know what to do now?

jrockowitz’s picture

A immediate workaround might be to delete the Webform table and let the update hook recreate it.

BlinX’s picture

In phpMyAdmin I see:
drup_webform
drup_webform_submission
drup_webform_submission_data
drup_webform_submission_log

Do I have to delete drup_webform ?
Without losing the existing webform or data?
And will it automaticaly be recreated by running update.php again?

Thanks,
Rolf

lomale’s picture

Hi JAKE

I will work on it on sunday. I installed a testwebsite with my running data.
I never had problems up to beta16 to 17, then I thought that i could now use beta 18 but same problem.

this time I'll only update webform manually and then run update.php. I will use your comment #27

"I need to know what the exact error is to be able to diagnose the problem. You will need to look at the Recent log messages." #31
is this what you mean. reports from the UI
The Database Logging module logs system events in the Drupal database. Monitor your site or debug site problems on this page.

yes i also updated two modules at the same time. #34
this time I will only update webworm

I'll let you know.
Lothar

BlinX’s picture

Seems my install is fine now!

Deleted drup_webform in phpMyAdmin;
Ran update.php

16 UPDATES BESCHIKBAAR
webform module

8061 - Issue #2871207: Random Multiple Submissions. Create webform table.
8062 - Issue #2871207: Random Multiple Submissions. Populate next serial in webform table.
8063 - Issue #2891108: Recreating deleted webform with same name results in error.
8064 - Issue #2878193: Allow actions (aka submit buttons) to be placed anywhere on a webform.
8065 - Issue #2888717: Option to include empty components in [webform_submission:values] token.
8066 - Issue #2893111: Add permissions to form and element access controls.
8067 - Issue #2893147: Allow empty element label to be customized.
8068 - Issue #2896667: Add Reset button.
8069 - Issue #2895140: Email handler field(s) convert special chars to HTML code.
8070 - Issue #2895809: Promote partnerships within the Webform module.
8071 - Issue #2898424: Improve Remote Post.
8072 - Issue #2901738: Add support conditions to WebformHandler.
8073 - Issue #2905955: Update hook webform_update_8048 is broken.
8074 - Issue #2906292: Display element description as help icon (tooltip).
8075 - Issue #2895671: Entity reference format.
8076 - Issue #2908080: Allow options single and multiple format to be specified during export.

OK !!

Table drup_webform is back in phpMyAdmin

Resume:
In the end it seems that an old version of Poll was interferring and made the error a bit more challenging. Poll wasn't deleted properly.
After resetting Poll, the only error with Webform was "#8061 bijwerken
Mislukt: Drupal\Core\Database\SchemaObjectExistsException: Webform table already exists."

Jacob, BIG thanks for your help and time!

lomale’s picture

Issue tags: +update, +successful
FileSize
870.85 KB

Here is my update process - i put a txt file with it where you can look at all the screenshots

I went after #27

Installed beta16
Login
went to Contact form
after that the log showed this the log file showed suspicion Type error: Argument 1 passed to Drupal/webform
I uploaded beta18 manually via FTP
Went to any page on your website
This was already not possible anymore - The website encountered an unexpected error try later

but at least : Message to set the setting file update_free_access to TRUE
then i could run /update.php

but this error occurred - Message phone_types do not exist

but finally the update worked and the site runs.

Thanks Lothar

PS I will try on an other server to find if there is the same course

jrockowitz’s picture

It is worth noting that admins who can't log in and access update.php because of this error, can use the update_free_access setting in settings.php.

  • jrockowitz committed f774791 on 8.x-5.x
    Issue #2907960 by jrockowitz, lomale, BlinX, henrikar, LaravZ, deuteron...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.