Skip to content

Prevent OrientationPanel from patching on mount or element change

Erwan Rouchet requested to merge fix-orientation-panel-patch into master

Closes #743 (closed)

When the OrientationPanel loads, it is possible for the element to not be loaded yet, or its element might suddenly change without the component changing, for example when browsing back and forth between multiple elements, or after simply renaming the element. When this happens, it will update its own fields. But there are watchers on those fields, to update the element if the fields change; so when the fields are changed by the element, the panel immediately runs a PATCH query even when it is completely unnecessary.

This can cause 403 errors to show up for logged-out users, or those with read-only access or unverified emails, particularly when loading an already rotated or mirrored element.

Merge request reports

Loading