bjan
bjan

Reputation: 2030

Dynamic Content region must use a template with ID attribute

I am getting following warnings/errors on browser's console. Need help to to trace and resolve these.

Service workers are not supported on HTTP pages.
Dynamic Content region must use a template with ID attribute
Uncaught Error: Region element not found R8673356286039918

enter image description here

desktop_all.min.js?v=23.1.0:5 Service workers are not supported on HTTP pages.
e.warn @ desktop_all.min.js?v=23.1.0:5
a.init @ desktop_all.min.js?v=23.1.0:56
(anonymous) @ brentity?p2_form_mode=A&session=23824403876947&cs=1hYXr2ArG3_e2gkrL3_LRx3UHQqIHPp6H0k1pUHyMPqYW0l-n6M2ZmPbAKGBSMgr7qYA-t1nqMXNobXExoxO09Q:2507
desktop_all.min.js?v=23.1.0:5 Dynamic Content region must use a template with ID attribute
e.error @ desktop_all.min.js?v=23.1.0:5
s @ desktop_all.min.js?v=23.1.0:53
(anonymous) @ desktop_all.min.js?v=23.1.0:53
e @ desktop_all.min.js?v=23.1.0:2
t @ desktop_all.min.js?v=23.1.0:2
setTimeout (async)
(anonymous) @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
fire @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
ready @ desktop_all.min.js?v=23.1.0:2
$ @ desktop_all.min.js?v=23.1.0:2
desktop_all.min.js?v=23.1.0:5 console.trace
e.error @ desktop_all.min.js?v=23.1.0:5
s @ desktop_all.min.js?v=23.1.0:53
(anonymous) @ desktop_all.min.js?v=23.1.0:53
e @ desktop_all.min.js?v=23.1.0:2
t @ desktop_all.min.js?v=23.1.0:2
setTimeout (async)
(anonymous) @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
fire @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
ready @ desktop_all.min.js?v=23.1.0:2
$ @ desktop_all.min.js?v=23.1.0:2
desktop_all.min.js?v=23.1.0:14 Uncaught Error: Region element not found R8673356286039918
    at l.create (desktop_all.min.js?v=23.1.0:14:1801)
    at new s (desktop_all.min.js?v=23.1.0:53:591)
    at HTMLDocument.<anonymous> (desktop_all.min.js?v=23.1.0:53:666)
    at e (desktop_all.min.js?v=23.1.0:2:30158)
    at t (desktop_all.min.js?v=23.1.0:2:30460)
l.create @ desktop_all.min.js?v=23.1.0:14
s @ desktop_all.min.js?v=23.1.0:53
(anonymous) @ desktop_all.min.js?v=23.1.0:53
e @ desktop_all.min.js?v=23.1.0:2
t @ desktop_all.min.js?v=23.1.0:2
setTimeout (async)
(anonymous) @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
fire @ desktop_all.min.js?v=23.1.0:2
c @ desktop_all.min.js?v=23.1.0:2
fireWith @ desktop_all.min.js?v=23.1.0:2
ready @ desktop_all.min.js?v=23.1.0:2
$ @ desktop_all.min.js?v=23.1.0:2

EDIT 1

It seems like a bug in Apex 23.1.3 (desktop_all.min.js?v=23.1.3)

Steps to re-produce

  1. Create a new page
  2. Create a region
  3. Change its Type to Dynamic Content
  4. Write return ''; in PL/SQL Function Body returning a CLOB
  5. Change Template to None under Appearance
  6. Run the page

Console will log both errors.

Upvotes: 0

Views: 313

Answers (1)

Mohamed Adam
Mohamed Adam

Reputation: 1

First You nust add and Static ID for the Dynamic Content Region. then Ensure the return CLOB includes an ID attribute in the main container with the same id of the Dynamic Content.

ex:

  1. Dynamic Content Region Static ID=IG20
  2. instead of return '';
  3. try return '<div id="IG20"></div>';

Upvotes: 0

Related Questions