Follow-up to #2805097: Should the YAML form module change its name?

The YAML Form module is going to be moving into the 8.x-5.x branch of the Webform module.

Steps

  • Update YAML Form module's project page, status, and issue tracker message.
  • Rename YAML Form 8.x-1.x to Webform 8.x-5.x
  • Move YAML Form 8.x-1.x to Webform 8.x-5.x issues
  • Provide YAML Form 1.x to Webform 5.x migration
  • Update YAML Form module's project page and status.

Tickets

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

fenstrat’s picture

Project: YAML Form » Webform
Version: 8.x-1.x-dev » 8.x-5.x-dev

I've updated the project page to give a better indication of the current YAML Form to Webform rename. Obviously feel free to make further modification @jrockowitz.

JohnGraffio’s picture

I tried running the YAML to Webform update and got this:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /update.php/start?id=132&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText:

There were 75 database updates, only six completed. Then I get this:

Drupal database update

The update process was aborted prematurely while running update #8008 in yamlform.module. All errors have been logged. You may need to check the watchdog database table manually.

That's as far as it all gets.

jrockowitz’s picture

The migration issue has been fixed in the latest dev release of the Webform module.

Please see #2833832: After upgrade from YAMLForm: "undefined function webform_schema()".

Once I get confirmation that the migration is working correctly, I will tag a new release.

JohnGraffio’s picture

I just tried the YAML to Webform migration on a fresh install of Drupal 8.24, using the WebForm 5.x dev branch, got the following error:

Drupal database update

The update process was aborted prematurely while running update #8008 in yamlform.module. All errors have been logged. You may need to check the watchdog database table manually.

Front page
Administration pages

The following updates returned messages:
yamlform module
Update #8001

Update form settings removed 'mail.default_body' and replaced with 'mail_default_body_text' and 'mail_default_body_html' Updated email handler for forms: contact, template_contact, template_donation, template_job_application, template_job_seeker_profile, template_registration, template_session_evaluation, template_subscribe, template_user_profile

I'll watch the issue queue for any updates. Thanks!

criscom’s picture

I just migrated yamlform to webforms 8.x-5.0-beta2 using 8.x-1.0-beta27 without any problems.

andypost’s picture

would be great to have some script or change record with a way how to migrate custom code because lots of classes renamed

jrockowitz’s picture

Actually, I have drush command I am using to do the renaming. Maybe I can refactor it to target a custom module.

Right now, most developers should just do a search-n-replace using the below strings

  • YAML Form => Webform
  • Yaml Form => Webform
  • YamlForm => Webform
  • Yamlform => Webform
  • yamlform => webform
criscom’s picture

On an NGINX server running mariadb and php7 I keep running into

drush yamlform-to-webform-migrate -y
Are you sure you want to migrate from YAML Form 8.x-1.x to Webform 8.x-5.x? The migration may take a few minutes. (y/n): y
PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /srv/www/htdocs/core/lib/Drupal/Core/Database/Statement.php:59           [error]
Stack trace:
#0 /srv/www/htdocs/core/lib/Drupal/Core/Database/Statement.php(59): PDOStatement->execute(Array)
#1 /srv/www/htdocs/core/lib/Drupal/Core/Database/Connection.php(610): Drupal\Core\Database\Statement->execute(Array, Array)
#2 /srv/www/htdocs/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(81): Drupal\Core\Database\Connection->query('ALTER TABLE nod...', Array, Array)
#3 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/src/YamlFormToWebformMigrateManager.php(349): Drupal\Core\Database\Driver\mysql\Connection->query('ALTER TABLE nod...')
#4 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/src/YamlFormToWebformMigrateManager.php(219):
Drupal\yamlform_to_webform\YamlFormToWebformMigrateManager->renameColumns('node_revision__...')
#5 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/yamlform_to_webform.drush.inc(68): Drupal\yamlform_to_webform\YamlFormToWebformMigrateManager->migrate()
#6 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(366): drush_yamlform_to_webform_migrate()
#7 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#8 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(185): drush_command()
#9 /home/lmdrupal/.config/composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#10 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /home/lmdrupal/.config/composer/vendor/drush/drush/drush.php(12): drush_main()
#12 {main}

Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.: ALTER TABLE node_revision__yamlform
CHANGE yamlform_target_id webform_target_id varchar(255); Array
(
)
 in /srv/www/htdocs/core/lib/Drupal/Core/Database/Connection.php:671
Stack trace:
#0 /srv/www/htdocs/core/lib/Drupal/Core/Database/Connection.php(635): Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'ALTER TABLE nod...', Array, Array)
#1 /srv/www/htdocs/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(81): Drupal\Core\Database\Connection->query('ALTER TABLE nod...', Array, Array)
#2 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/src/YamlFormToWebformMigrateManager.php(349): Drupal\Core\Database\Driver\mysql\Connection->query('ALTER TABLE nod...')
#3 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/src/YamlFormToWebformMigrateManager.php(219):
Drupal\yamlform_to_webform\YamlFormToWebformMigrateManager->renameColumns('node_revision__...')
#4 /srv/www/htdocs/modules/yamlform/modules/yamlform_to_webform/yamlform_to_webform.drush.inc(68): Drupal\yamlform_to_webform\YamlFormToWebformMigrateManager->migrate()
#5 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(366): drush_yamlform_to_webform_migrate()
#6 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#7 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/command.inc(185): drush_command()
#8 /home/lmdrupal/.config/composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#9 /home/lmdrupal/.config/composer/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#10 /home/lmdrupal/.config/composer/vendor/drush/drush/drush.php(12): drush_main()
#11 {main}

We have the following DB setup:

MariaDB [(none)]> show global variables like 'innodb_lar%';
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| innodb_large_prefix | ON    |
+---------------------+-------+
1 row in set (0.01 sec)

MariaDB [(none)]> show global variables like 'innodb_fil%';
+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| innodb_file_format       | Barracuda |
| innodb_file_format_check | ON        |
| innodb_file_format_max   | Barracuda |
| innodb_file_per_table    | ON        |
+--------------------------+-----------+
4 rows in set (0.00 sec)

MariaDB [(none)]>

alter table node__yamlform ROW_FORMAT=DYNAMIC;
alter table node_revision__yamlform ROW_FORMAT=DYNAMIC;
alter table yamlform_submission ROW_FORMAT=DYNAMIC;
alter table yamlform_submission_data ROW_FORMAT=DYNAMIC;
jrockowitz’s picture

Please stop reporting migration issue to this [meta] ticket and look at the YAML Form modules' issue queue.

@criscom Please see #2834129: Website Encountered an Unexpected Error on Migrate. The patch needs some testing.

criscom’s picture

Ok, @jrockowitz, sorry about this.

We fixed it by moving the installation to a different server, ran the update script there, and moved the database back to where we had the problem.

For us the issue is resolved.

javjaff’s picture

Thanks. I tested the patch described in issue #2834129: Website Encountered an Unexpected Error on Migrate. It resolved the problem in my case. It need to be used before migration of course ;)

jrockowitz’s picture

I committed the patch so you just need to use the latest dev release of the YAML form module.