Closed (fixed)
Project:
YAML Form
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2016 at 16:23 UTC
Updated:
6 Jan 2017 at 11:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedPlease install the latest dev release and you should be okay.
Please make sure that the webform.update.inc file is removed when you update the module.
Comment #3
jlsegul commentedThe latest dev version correctly installed. The forms all work correctly, yaml form was disabled and the update file deleted itself correctly. It just left one little error on the status report:
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Content
The node.webform field needs to be updated.
Webform submission
The Webform field needs to be updated.
Any idea why?
Thanks
Comment #4
jrockowitz commentedYep, that makes sense because of #2834203: Convert yamlform field target_id from 255 characters to 32 characters.. Did you run the db update?
Comment #5
jlsegul commentedYes, I ran update.php a couple of times. The only update that came up was for webform_UI.
Comment #6
jrockowitz commentedTry running cron.
Can you execute the below SQL and see if there are any records?
SELECT * FROM key_value WHERE collection LIKE '%yamlform%';If there are some records please try running the below SQL..
UPDATE key_value SET collection = REPLACE(collection, 'yamlform', 'webform');Please give me an update ASAP since I think other people might be having the same issue.
Comment #7
jrockowitz commentedBelow is the update hook that will most likely need to be added to the webform module.
Comment #8
jlsegul commentedI assume that I run this from root. I normally use macOS terminal for composer and such commands. Anyway, when I run SELECT * FROM key_value WHERE collection LIKE '%yamlform%'; I get the following error message: -bash: syntax error near unexpected token `from'
Is there another place I should be running this statement or software program? I noticed it also didn't like capital letters in terminal.
Comment #9
jrockowitz commentedIt is SQL statement so you need to execute in MySQL via something like PHPMyAdmin.
If you have drush installed you can also execute the below command from bash.
drush sqlq "SELECT * FROM key_value WHERE collection LIKE '%yamlform%';"Comment #10
jlsegul commentedThanks. Used phpAdmin to run the query and got a 0 rows affected result. Can't figure out why update won't see that they need updating.
Comment #11
jrockowitz commentedGlad to hear the query returned 0 rsults.
Updating the database won't resolve the warning.
You need to run
drush entity-updates. See https://www.drupaleasy.com/quicktips/drupal-8-mismatched-entity-field-de...Comment #12
jlsegul commentedWell, that was interesting. I logged into root and installed Drush VPS wide. I ran entity-updates and got this message:
The following updates are pending:
node entity type :
The node.webform field needs to be updated.
webform_submission entity type :
The Webform field needs to be updated.
Do you wish to run all pending updates? (y/n): y
Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException:[error]
The SQL storage cannot change the schema for an existing field (webform in node entity) with data. in
Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->updateDedicatedTableSchema() (line 1285 of
/home/seagullcom/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
Failed: [error]
Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException:
!message in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->updateDedicatedTableSchema()
(line 1285 of
/home/seagullcom/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
Cache rebuild complete. [ok]
Finished performing updates.
Nothing is simple, but I'm learning a lot.
Comment #13
jrockowitz commentedI think one of the update hooks from #2834203: Convert yamlform field target_id from 255 characters to 32 characters. failed to run.
You could try to manually converting the webform field from 255 characters to 32 characters using PHPMyAdmin.
Comment #14
abaier commentedI am also experiencing update problems, also after a successful migration using the latest dev versions of yamlform and webform.
I was able to fix the status notices running
drush entup.Today I tried running
drush updbfrom8.x-5.0-beta2+13-devto8.x-5.0-beta3and got an error in the following process:webform module: 8005 - Issue #2837090: Undefined function call webform_schema.My drush output for the sql query in #9 is:
Any advise how I could run this update successfully and if my migration really was finished correctly? Thanks in advance!
Comment #15
jrockowitz commentedThe issue is the migration failed to update the key_value.collection column and I am attempting to fix this issue via an update hook.
I am think there are now orphaned yamlform records in this table.
For now I am going to have to remove the update hook.
@toni4i Can you export your entire key_value table so that I can examine it and hopefully fix it? I might be able to just delete the old yamlform records.
Comment #16
abaier commentedYes, sure. I sent you a pm with a wetransfer link to the dump.
Comment #17
jrockowitz commentedCan someone please test the attached patch?
Please run the below query before and after testing the patch. Hopefully after you run the query no results will be returned.
SELECT * FROM key_value WHERE collection LIKE '%yamlform%';Comment #18
jrockowitz commentedComment #20
jrockowitz commentedFixed Please download or checkout the latest dev release.
Comment #21
jlsegul commentedThe drush entup command did fix the problem. Thanks everyone.
Comment #22
abaier commentedThanks Jake! Using the latest dev of webform, the update mentioned in #14 went through successfully. Regarding the output of
SELECT * FROM key_value WHERE collection LIKE '%yamlform%';I have to disappoint you – this has not changed after the update. Still exactly the same. Should I be worried about that or could I just leave these entries in my db without risking conflicts?The patch of #18 was included in the latest dev, right? Or did I have to apply it?
Comment #24
jrockowitz commented@toni4i The patch from #18 did not apply correctly to the webform module.
Can you please update your copy of the webform module to latest dev release and run the database updates.
Comment #25
abaier commentedPerfect, now the output for the query is empty. Thanks for the quick fix!