Read-only Field Widget not meant to use geocoder, cannot save widget due to geocoder_field error

Created on 26 June 2024, 2 months ago
Updated 7 September 2024, 1 day ago

Problem/Motivation

Trying to set a text field to read only using the Read Only Field Widget module , but even though i am setting the Format to plain text and the Geocoder options correctly go away, pressing update on the field widget has no effect and saving the "Manage form display" form is prevented by this error:

"The selected Geocode operation needs at least one provider."

After uninstalling geocoder_field it worked as expected.

Steps to reproduce

  1. Install Read Only Field Widget
  2. Edit a text field to use it, changing Format to "Plain text"
  3. Try to save the form display

Proposed resolution

Geocoder field needs to check if anything is asking for it before checking if a provider is needed, or do a warning not a hard error?

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Needs review

Version

4.0

Component

Code

Created by

🇺🇸United States mlncn Minneapolis, MN, USA

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

Comments & Activities

  • Issue created by @mlncn
  • Status changed to Postponed: needs info 2 months ago
  • 🇮🇹Italy itamair

    Thanks for reporting this, but indeed I cannot reproduce what you report.
    I installed the "Read Only Field Widget" module and followed your steps on tha Text (Plain) field,
    and I am perfectly able to set its Widget to Readonly / Plain Text without being blocked by that Geocoder warning that you mention / report.
    All looks fine to me, without any collision between the Geocoder and the "Read Only Field Widget" module.
    Could you double check? ... and eventually provide more details and more evidence on how to reproduce this that you assume is a Bug of the Geocoder module.

  • 🇺🇸United States mlncn Minneapolis, MN, USA

    Thank you for trying that out promptly. Great apologies for my missing the response. All i know is it is still happening.

    To be clear the part with configuring the widget looks the same, but when pressing Update it does not close, and when trying to save the whole page, that is when the blocking error occurs.

    Are you certain that you have no Geocoding providers configured? I left out that negative step, sorry.

    And i'm sure you're certain the geocoder_field submodule is enabled.

  • Status changed to Active 4 days ago
  • 🇺🇸United States mlncn Minneapolis, MN, USA
  • Status changed to Postponed: needs info 4 days ago
  • 🇺🇸United States mlncn Minneapolis, MN, USA

    Wait, never mind, having a geocoding provider (or at least random) set up does not help. I'll try a bit more to isolate.

  • Status changed to Active 4 days ago
  • 🇺🇸United States mlncn Minneapolis, MN, USA

    I am able to reproduce this with the same steps on a different site.

    Are you sure geocoder_field submodule is enabled?!

    Geocoder should be an option for the Readonly field format (in the dropdown with Plain text), just not the one selected.

    The attached patch is far from the correct fix, but it is a workaround. Maybe it is more Readonly's responsibility to suppress or not trigger the settings forms of its options?

  • Status changed to Needs review 1 day ago
  • 🇮🇹Italy itamair

    Indeed I could replicate this issue / blocker ... but indeed this looks strictly related to the specific "Read-only Field Widget" module way of altering the default / specific field widgets, basically translating the Formatter UX / logics into it.

    Hence I changed this issue Tile accordingly, because definitely this looks something potentially (& specifically) caused by the "Read-only Field Widget" module ... and may be not a Geocoder bug / limit, isn't it?

    I can also see that the provided patch is successfully working around this "Read-only Field Widget" use case,
    and I don't know if this deserves more inspections and debug analysis, and a more solid solution.
    (every body is welcome to provide further contribution on this ... ).

    Let's mark this as ready for review and let's see if some further opinion come to better understand what should be (eventually) committed in the Geocoder module codebase (this patch or something more solid and general).

    What about also opening a new issue in the "Read-only Field Widget" module thread that points to this one?
    May be its maintainer(s) could better understand what to fix / adjust and where ...

  • 🇺🇸United States mlncn Minneapolis, MN, USA

    Thank you again for your amazing responsiveness, created an issue at Readonly field widget: 🐛 Save of Read Only widget fails in hard to debug way when Geocoder Field is enabled Active

Production build 0.71.5 2024