Uploaded image for project: 'Magnolia Frontend Helpers'
  1. Magnolia Frontend Helpers
  2. MGNLFE-331

vue2-editor - global.mgnlInPageEditor in SSR

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • None
    • None
    • None

    Description

      Steps to reproduce

      1. Clone minimal-headless-demo
      2. Go to /spa/nuxtjs-ssr-minimal
      3. Install dependencies
      4. Run with npm run dev

      Expected results

      no errors in console

      Actual results

      For SSR, please set 'global.mgnlInPageEditor' to true when you need to render edit bars, and false when not.

      Workaround

      Development notes

      It seems like it's not blocking rendering of the page, so it's good

      Edit mode is not affected either (I can still see green bars and edit the page)
      Only this strange error is appearing in console

      Exception origin: https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/template-annotations/src/service/EditorContextHelper.js#39

      Probably related to: https://jira.magnolia-cms.com/browse/MGNLFE-118
      and PersonalizationService.getVariant()

      Demo doesn't have global.mgnlInPageEditor set in page. Providing such variable in asyncData, setup callback, middleware or plugin seems to not making any effect
      switching global to globalThis not helping also

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              NDQ Mykola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD