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.

Comments

dotsi created an issue. See original summary.

dotsi’s picture

Issue summary: View changes
megachriz’s picture

There 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.

megachriz’s picture

Status: Active » Needs review
megachriz’s picture

Issue summary: View changes
Issue tags: +sfdug2020

Tagging issue for Global Contrib Weekend Event at SFDUG. Thursday Jan 23.

Briefly updated the issue summary.

jrochate’s picture

Issue summary: View changes
Related issues: +#3331028: Increase default textfield #maxlength=128 to 256
StatusFileSize
new871 bytes

The feeds_ex module extends the BlankSource of Feeds module here:
feeds_ex/src/Feeds/CustomSource/JsonSource.php

When inspecting the BlankSource in Feeds module, we can see that there is no #maxlength associated: feeds/src/Feeds/CustomSource/BlankSource.php

So, 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:

class JsonSource extends BlankSource {

So, here is a patch to force the #maxlength of BlankSource to be 1024.

  • MegaChriz committed 46d0a827 on 8.x-3.x authored by jrochate
    Issue #3097522 by jrochate: Set maximum length of blank source's value...
megachriz’s picture

Status: Needs review » Fixed

The patch in #7 failed to apply, but I applied the changes from it manually and committed that. Thanks!

Status: Fixed » Closed (fixed)

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