Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6427

WorkspaceMapping not correctly supported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Neutral
    • None
    • 5.3.11
    • core
    • None
    • LFRZ (but this is a general problem)

    Description

      Magnolia's repository configuration (repositories.xml) and workspace mapping logic permit mapping "logical" workspace names to "real" workspace names.

      See: info.magnolia.repository.definition.WorkspaceMappingDefinition

      Example XML:

          <RepositoryMapping>
              <Map name="website" repositoryName="magnolia" workspaceName="website" />
              ...
          </RepositoryMapping>
      

      However, various other parts of magnolia don't respect this mapping, leading to incorrect behaviour if the logical workspace name and physical workspace name is not the same.

      For example, see:
      info.magnolia.ui.vaadin.integration.jcr.JcrItemUtil.getItemId(Item)
      --> here ItemIds are created using the "real" workspace name, it should however be the "logical" workspace name

      or see:
      info.magnolia.ui.framework.action.AbstractCommandAction.buildParams(Item)
      --> here the "real" workspace name gets put in the command params, rather than the logical name.

      Basically, AFAICS this will cause problems whenever the logical and physical names don't match exactly.
      And it will cause even more headaches when the logical workspace name is different from the physical workspace name, and the physical name is present also as a logical name...
      Eg; when including the workspace "website" from an old repository, using the logical name "old_website".

      A subtle error, to be sure, but to be consistent magnolia either needs to fix this, or to remove the ability to set logical workspace names in repositories.xml.

      I think maybe the way to solve this is by adding this logic to the Node/Session/Workspace wrappers...

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                runger Richard Unger
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD