We are working on importing some content to a site and are using the popular feeds module. Unfortunately we could not see an option for weight module. Has anyone used the weight module with feeds or is it not supported?

Comments

Sohal Khatwani created an issue. See original summary.

y_h’s picture

StatusFileSize
new1.82 KB

The weight 7.x-2.x branch had this implemented.

I had the same problem so i made a patch for the 7.x-3.x branch.
Weight is a field type now so when you're mapping your field sources to targets you can now select all fields of type weight.

bellwether’s picture

I created a second field for my weight column in my content type, and then made a rule that on event: Before saving an item imported via [my content type] importer, committed the action "Set a data value" for Parameter: Data: [node:field-weight] using my second field, Parameter: Data: [node:field-prominence]... Ends up with a duplicate field to weight, but at least I can import it.

sohal khatwani’s picture

Thanks @y_h for the patch and @bellweather for the workaround. We also used the workaround i.e. first did the import and then select all the content from the content type and gave it a weight. I have not tried the patch as yet. Cheers.

ziomizar’s picture

Status: Active » Closed (won't fix)

I guess that any new feature will be introduced in the 7.x-3.1 version

maurizio.ganovelli’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new1.76 KB

I'm sorry to reopen this issue but seems like this feature is still missing in 7.x-3.1.

Patch above doesn't apply cleanly (some CRLF problems) and in case weight field is not on the input feed, using NULL as default value causes an error:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_weight_value' cannot be null

Attached patch set as default a 0 value: can you review and commit it, since would be great feature to have?

Thank you in advance.

vladimiraus’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

Thank you. Approved. 😃

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Committed! 🥂

Status: Fixed » Closed (fixed)

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

argiepiano’s picture

This patch only offer feeds support for nodes. How about other core entities like user and taxonomy terms?

vladimiraus’s picture

@argiepiano I'd recommend to open another issue and list possible test cases.