- Issue created by @RayanD
- π©πͺGermany a.dmitriiev
Status "Needs work" is set for the issues that have some patch or MR that needs work. If there is nothing yet done, it should be just "Active"
- π©πͺGermany a.dmitriiev
As for the problem, are you trying to edit the paragraph or the content type and you don't see the real time updates?
If possible, could you please check the response of the request? The uri should be like `/frontend-editing/form/paragraph/1010?view_mode_id=default&ajax_form=1&_wrapper_format=drupal_ajax`, the method is POST.
In the response there should be an object similar to this:
Object { command: "feEntityPreview", selector: '[data-fe-preview-content="90778e28-1e72-44d1-8807-c5a818288237"]', viewModeId: "default", β¦ }
This object contains ajax command that triggers the preview for the DOM element with selector
data-preview="90778e28-1e72-44d1-8807-c5a818288237"
. Do you see this selector on the page? This data attribute is added to the entity wrapper (in this example is to paragraph wrapper), see here https://git.drupalcode.org/project/frontend_editing/-/blob/1.x/frontend_... . This also needs thatattributes
be printed in your entity's template. For example:<div{{ attributes }}> {{ content }} </div>
- Status changed to Postponed: needs info
5 months ago 11:06am 29 January 2025 - π§πͺBelgium flyke
I seem to have the same issue.
Project recently updated to Drupal 10.4.1.
Using frontend_editing 1.8.9Please see attached video for more info regarding to the response: its empty.
- π§πͺBelgium flyke
It seems the elements never get the data-preview attribute because I dont have a module named 'preview' enabled ?
if (\Drupal::moduleHandler()->moduleExists('preview')) { // Check if preview is allowed. $preview_config = \Drupal::config('preview.settings')->get('enabled') ?? []; if (!empty($preview_config[$entity->getEntityTypeId()][$entity->bundle()])) { $build['#attributes']['data-preview'] = $entity->uuid(); } }
- π§πͺBelgium flyke
Actually I see multiple references in the code to this phantom 'preview' module which I cannot find anywhere.
I searched the whole codebase of my project for 'name: preview' (for finding modules by their info.yml file) and for 'drupal/preview' for finding modules based on their composer.json file. No results at all.If I try to directly guess the url of the 'preview' module by typing in the address bar: ' https://www.drupal.org/project/preview β ' then I get redirected to another module ' https://www.drupal.org/project/preview_disable β '.
I don't get it at all, please describe where this preview module comes from that is referenced to inside the frontend_editing code. - π§πͺBelgium flyke
It unfortunatly took me a while to find out that the phantom 'preview' module is actually the 'all_entity_preview' module.
I downloaded and enabled that module.
While editing I can now enable preview and see my changes live, but still, after saving when the page is refreshed, the changes are not there.
'Preview' and 'Response' are still empty of the request tohttps://mysite.com/frontend-editing/form/paragraph/31584?view_mode_id=default&ajax_form=1&_wrapper_format=drupal_ajax
despite the fact that the element does get a data-preview attribute now, like:
<div data-preview="75853dfa-396b-448d-a56d-df180a1cafab" class="frontend-editing contextual-region p--text">
- π©πͺGermany a.dmitriiev
Preview and auto-refresh after save are different features. Preview allows you to see the results without actually saving the entity (paragraph, node, etc). After you hit "Save" button and the sidebar is closed, then the automatic refresh is in place, in case it is enabled here
/admin/config/frontend-editing/ui-settings
("Enable Ajax content update"). If that checkbox is checked there should be on the page a link (a tag) with classfrontend-editing-update-content
and it also has text and title "Reload content for this field", but the link itself is hidden. So, when you hit the "Save" button and sidebar is closed, in the background the click on this "Reload content for this field" is triggered automatically and then standard Drupal ajax is running a request to url like this/frontend-editing/update-content/node/123/some_file_name/default
(here instead of node will be the entity type of the parent of your paragraph, it might be also paragraph if your target paragraph is a nested one). The result of this request is inserted into a wrapper div that is created by the module around your paragraphs field, this wrapper has classfrontend-editing-field-wrapper
. - π©πͺGermany a.dmitriiev
I will also link this documentation page here https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β
- Status changed to Active
2 days ago 3:59pm 10 July 2025 - πΊπΈUnited States jacobbell84
I ran into this same issue. There's a few different ways it can happen from what I've seen. If you're using Gin after they added the sticky actions area it seems to break because buttons aren't where the module expects them to be in the DOM, so it can't find the form to trigger the preview. I attached a patch that fixes that for me and I think it's generalized enough that it should work elsewhere as well.
The second way it can break is caused by the integration between this and the preview module, especially around content types. I have an issue open there ( https://www.drupal.org/project/all_entity_preview/issues/3535058 π Issue with node previews Active ) to start a discussion, because there's multiple ways it could be fixed and would need to be synced up to both modules.
- π©πͺGermany a.dmitriiev
@jacobbell84 please share the Drupal version, Gin version and Frontend Editing version that you are using. This will have to review your patch. Thank you.