Posibility to skip geocoding on migration if value is not empty

Created on 3 August 2022, over 2 years ago
Updated 27 November 2024, about 2 months ago

On migration if lat/lng already provided I want to skip geocoding.

For now I can set static value in MigrateEvents::PRE_ROW_SAVE and remove that in MigrateEvents::POST_ROW_SAVE to mark that entity saving in migration.
In geocoder_field_entity_presave need to use that static value to skip geocoding if value exists.

Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

🇷🇺Russia kiseleva.t

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇴Romania amateescu

    The modern replacement for drupal_static() use-cases is a request attribute :)

  • Pipeline finished with Success
    about 2 months ago
    Total: 146s
    #352230
  • Pipeline finished with Success
    about 2 months ago
    Total: 163s
    #352890
  • 🇷🇴Romania amateescu

    Pushed a commit that uses the new request attribute during workspace publishing.

  • The MR looks good to me. One consideration here: As the presave hook is so expensive, it may be worth triggering a hook/an event that allows other modules to react when the hook is fired to skip further execution?

  • 🇸🇮Slovenia alecsmrekar

    Looks good to me as well!

  • First commit to issue fork.
  • 🇮🇹Italy itamair

    Thanks for al this, but I had some difficulties to understand that and how the attached #2 patch and the MR !60 are going to solve kind of same goal but in two parallels contexts of Migrations and Workspace publishing.

    It looks most of the folks here do belong to TAG1 and perfectly know what they are debating about and accomplishing (as the Workspace module logics) but it would also help some better description that is going to be implemented here.
    I kind of did it ... digging in the the MR !60, and its dependencies,
    BUT it would be hard for a normal contributor to understand what is going here, also because the Workspace module is still missing basis documentation and help content (isn't it?).

    So I feel to forward the following requests:
    - could you proper provide some better extended description of what is being achieved here, at once on both Migration and Workspace sides, and mostly ...
    - could you properly let me know if both the #2 patch and the MR !60 should be deployed in parallel (as RTBC) or even better could / should everything (from the #2 patch) be grouped / embedded in the MR !60 itself, if opportune?

    Thanks!

  • Pipeline finished with Skipped
    about 1 month ago
    #363763
  • 🇮🇹Italy itamair

    Ok I better inspected all this and all makes great sense to me also.
    I just added a commit on better commenting.
    Going to deploy this into new incoming 8.x-4.26 Geocoder release.

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

Production build 0.71.5 2024