Needs review
Project:
Webform: Migrate
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Sep 2020 at 08:56 UTC
Updated:
6 Jan 2022 at 17:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaComment #3
wim leersIs this a
@todofor this issue or for a separate issue?By "can be missing", do you mean "is optional"?
Comment #4
huzookaRe #3:
Comment #5
huzookaComment #6
huzookaComment #7
huzookaThis additional cleanup removes every invalid source plugin setting value, except
page_submit_pathandpage_confirm_path.The lack of the mentioned configs leads to 'undefined index' for webform config entities, so those ones get a proper default value
''(an empty string) instead.This patch depends on #3164697: migrations/d7 directory.
Comment #8
wim leersEven with this applied, I'm still getting:
Comment #9
huzookaComment #10
huzookaThis patch addresses #8.
Postponing on #3164697: migrations/d7 directory.
Comment #11
wim leersNow I'm still seeing:
Comment #12
wim leersComment #13
matroskeen384 line is
if ($extra['type'] == 'textfield') {@Wim Leers, can you check the value of
extracolumn inwebform_componenttable for the component that throws this notice?I'm looking at
webform/components/number.inc(D7 version) and it expects ['extra']['type'] always to be available (there are no additional checks).Considering that data is corrupted for some reason, I think we can fallback to textfield type, but let's try to figure out why it's empty 🤔
Comment #14
andriyun commentedHi mates
Thank you very much for working on this direction.
I'd be very appreciate for having some info in issue description.
It's very complicate to find out issue goal only by issue name,
As I see this issue is blocker for adding tests.
Patch #10 already allowing to run tests added in #3172139: Enable project testing, and add a kernel test and a source database and files fixture
Gonna commit it.
Comment #16
matroskeenI just found one more:
Notice: Undefined offset: 1 in /var/www/docroot/modules/contrib/webform_migrate/src/Plugin/migrate/source/d7/D7Webform->buildItemsString() line 978Can be reproduced in the following case:
D7 component type: grid
questions value: "1|Hello...\n"
Given the string ends with \n, the result of
$items = explode("\n", $rawString);ingetItemsArray()is:Adding a quick fix to trim the string before exploding.
Comment #17
huzookaWe need an array filter probably....
Comment #18
matroskeenYep, that would be better 😊
Comment #19
matroskeenComment #20
liam morlandComment #22
liam morlandCreated merge request with patch
webform_migrate-undefined_index-3172154-18_0.patchfrom #18.