Skip to content

Move replace_link_variables_by_paths function in plone.app.contenttypes.utils to plone.base. Use it in plone.app.z3cform instead of its local clone. #712

Description

@yurj

the function replace_link_variables_by_paths is defined in:
https://github.com/plone/plone.app.contenttypes/blob/master/plone/app/contenttypes/utils.py#L29

There's the same exact function with the same code, defined here:

https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/utils.py#L68

This plone.app.z3cform is used in the converter:

https://github.com/plone/plone.app.z3cform/blob/3bf3c73d7139cd1a2fddeb7aa694e3b7b1734b9e/plone/app/z3cform/converters.py#L524

while https://github.com/plone/plone.restapi/blob/main/src/plone/restapi/serializer/dxfields.py

uses the one from plone.app.contenttypes.utils

A solution could be to move plone.app.contenttypes.utils.replace_link_variables_by_paths to plone.base and remove the one in plone.app.z3cform.

cc: @jensens

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions