Support redirect entity for Feeds.
Patch will be attached

Issue fork redirect-3046873

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

artematem created an issue. See original summary.

artematem’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB
jesss’s picture

Status: Needs review » Needs work

This seems like an essential piece of the puzzle -- how can you import a redirect without the source?

That said, this patch is in the wrong namespace, so it throws errors. This patch is for the Feeds module, so the namespace should be namespace Drupal\feeds\Feeds\Target; not namespace Drupal\redirect\Feeds\Target;. Or, it should be reworked to patch the Redirect module instead.

damondt’s picture

Status: Needs work » Reviewed & tested by the community

The namespace namespace Drupal\redirect\Feeds\Target; is correct, this works without issue.

kleiton_rodrigues’s picture

The patch applies cleanly and works as expected.
RTBC+1

kleiton_rodrigues’s picture

Assigned: Unassigned » kleiton_rodrigues
kleiton_rodrigues’s picture

Assigned: kleiton_rodrigues » Unassigned
scotwith1t’s picture

+1 thanks!

scotwith1t’s picture

StatusFileSize
new20.96 KB

How do we avoid the duplication warnings when re-running the same feed if the (for example csv file) source has been updated?

Warning message
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'HJN0C2ixrt8oFOjq6MHmQsJbrjWYsh6wq_iM2fL3E4w' for key 'hash': INSERT INTO "redirect"

Since the "from" in a redirect is only allowed to go to one "to" destination, it would make sense to be able to select the redirect_source as Unique in the fields UI.
feeds redirect unique source

kristen pol’s picture

Assigned: Unassigned » kristen pol

Assigning to myself as I'm triaging all RTBC issues.

jpshayes’s picture

Did this patch make it into the latest dev branch? I have a need for this and I am happy to test or help if it is needed.

phergo’s picture

StatusFileSize
new1.08 KB

I have added the option to set the "redirect_source/path" property as unique in order to avoid duplication warnings.

phergo’s picture

phergo’s picture

StatusFileSize
new1.08 KB

Patch #14 adds the ability to mark the "redirect_source/path" property as unique in order to avoid duplication warnings.

hswong3i made their first commit to this issue’s fork.

hswong3i’s picture

Convert to MR, rebase with 8.x-1.x-dev

megachriz’s picture

kristen pol’s picture

Assigned: kristen pol » Unassigned

The AI initiative has consumed me so unassigning

berdir made their first commit to this issue’s fork.

berdir’s picture

Status: Reviewed & tested by the community » Needs work

This will need to handle phpstan, probably by adding feeds as a dev dependency or ignoring those errors.