enonic / lib-admin-ui

Enonic XP Administration UI.
GNU General Public License v3.0
5 stars 5 forks source link

Error when applying changes when editing fragments #757

Closed RF0 closed 4 years ago

RF0 commented 6 years ago

Tested in 6.15.1-SNAPSHOT, Chrome

  1. Make sure vhost is enabled (see comment below)
  2. Install app-superhero-blog from market
  3. Edit the front page
  4. Right click any part f.x. "Recent Posts" and choose "Save as fragment"
  5. Choose "Edit fragment"
  6. Click the part in live edit and change a configuration f.x. Title and click apply
  7. Changes are not applied. Spinner hangs. Observe the browser Console log and see attached stacktrace (stacktrace is from building with -Penv=dev mode)

setAttribute-stacktrace.txt

RF0 commented 6 years ago

I have done some testing on different machines, and I have reproduced it on mac and windows. This problem actually only appears when vhost is enabled on the server. F.x. if i enter the following in the com.enonic.xp.web.vhost.cfg file, the problem gets back, but disappears when i set enabled = false. Is this expected behavior?

enabled = true

mapping.test.host = localhost mapping.test.source = / mapping.test.target = / mapping.test.userStore = system

alansemenov commented 6 years ago

@GlennRicaud This looks like a server-side issue. Basically, after changes are applied to a component (f.ex. a part) inside the Inspect panel, we make an ajax request to component url (f.ex. /admin/portal/edit/draft/1a9d8cc8-9896-4cda-aa1d-3a2f761360dc/_/component) to fetch its html source and render only the changed component in LiveEdit. The problem is that when vhost is enabled, the component url returns HTML source of the entire page instead of only the component's.

Please investigate.