Problem/Motivation
I'm using the Feeds & Feeds extensible parsers modules to import product data from a JSON file which has a very complex structure, and because of that the JSONPath expressions sometimes grow quite long.
Proposed resolution
To support this, I've extended the #maxlength value of the new source field from 128 (default) to 256.
Remaining tasks
- Test if long JSON expressions can be used with the provided patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | feeds-maxlength.patch | 871 bytes | jrochate |
| mappings_new_source_maxlength.patch | 482 bytes | dotsi |
Comments
Comment #2
dotsi commentedComment #3
megachrizThere was already an issue about this, but since this one has a patch I close the other one instead: #3095359: Source field size is too small.
Comment #4
megachrizRelated issue: #2938505: Add UI for editing and removing custom (CSV) sources
Comment #5
megachrizComment #6
megachrizTagging issue for Global Contrib Weekend Event at SFDUG. Thursday Jan 23.
Briefly updated the issue summary.
Comment #7
jrochate commentedThe feeds_ex module extends the BlankSource of Feeds module here:
feeds_ex/src/Feeds/CustomSource/JsonSource.phpWhen inspecting the BlankSource in Feeds module, we can see that there is no
#maxlengthassociated:feeds/src/Feeds/CustomSource/BlankSource.phpSo, the limit of the 128 chars length is imposed by Core's config entity.
Here is a discussion about it and where to go in the future #3331028
To circumvent this limitation, we can just add the maxlength to the BlankSource, and all the modules/source that extends it, will benefit from the change, like this one:
So, here is a patch to force the #maxlength of BlankSource to be 1024.
Comment #9
megachrizThe patch in #7 failed to apply, but I applied the changes from it manually and committed that. Thanks!