Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Why does the editor.html skip rendering resources?

Avatar

Level 2

A couple of years ago I've developed a so-called expand mode. Its purpose was to deal with complex components that would otherwise not fit easily both in publish mode and edit mode for smooth authoring. Its main idea was that I took my resource in question - let's say /content/page/jcr:content/complex and I could render it directly as /content/page/jcr:content/complex.expand.html. So I could go from localhost:4502/cf#/content/page.html via a button click to enter localhost:4502/cf#/content/page/jcr:content/complex.expand.html​ where my scripts enabled any authoring I'd imagine (while the previous page would leave a very compact view).

And then touch UI with /editor.html came. localhost:4502/editor.html/content/page.html​ works as expected since it targets a cq:Page resource. But localhost:4502/editor.html/content/page/jcr:content/complex.expand.html shows a blank page. It's like that for all resources other than pages. It doesn't fell right for me somehow. Why is it so? Isn't it a bug? It does not seem with such a restriction we would gain anything... Do we?

7 Replies

Avatar

Employee Advisor

Have you alread checked the logfiles of the AEM instance when it renders this blank page? I would also recommend to check in your browser console, if you have javascript errors.

Jörg

Avatar

Level 2

Yes, but the issue is not with my code. If you go to e.g. http://localhost:4502/editor.html/content/we-retail/us/en/jcr:content/root/hero_image.html on a fresh AEM 6.3 instance you'll simply get a blank page, view-source will show you a couple of whitespaces. And log says:

11.10.2017 10:47:48.340 *WARN* [0:0:0:0:0:0:0:1 [1507711668333] GET /editor.html/content/we-retail/us/en/jcr:content/root/hero_image.html HTTP/1.1] com.adobe.cq.xf.impl.servlet.rendercondition.EditorRenderCondition Page at path /content/we-retail/us/en/jcr:content/root/hero_image doesn't have a jcr:content node

It is deliberate restriction that most likely comes from simplification in the assumptions - editor.html must be assuming to only process cq:Page which cf# did not. I believe it takes just a couple of lines of code to fix that in AEM...

  • if cq:Page and jcr:content exists => use jcr:content as the resource
  • if not the above => use the current resource as-is

Avatar

Level 10

I believe you are correct - the TOuch UI does not work the same as Classic UI.

However - in Touch UI - why do you need such a script to edit components that should be done in Edit mode by an author?

Avatar

Level 2

I agree - indeed Touch UI does not work the same as Classic UI.

I've described my case extensively 4 entries above​, which part shall I clarify? I can (and I already did) find another way to do it due to the current limitations of Touch UI. However - why did you in AEM Eng limit the editor.html output possibilities that could probably work easily without the restrictions?

Avatar

Level 10

You can log a bug and investigate this.  Perhaps suggest a feature enhancement so the Touch UI would support this level of functionality.

Avatar

Level 2

I've never done this yet. Do I have permissions with my account? What is the official URL?

Avatar

Level 10

email cuscare@adobe.com to ensure you have an account.  Include your email address and company as well as the company’s Customer Id (EUID)