Frontend Editor

I have had no problem working with the excellent Frontend Editor extra (GitHub - apnix/frontendeditor: Frontend content editor for MODX) in the past when the site has a single context, but this week I am working with a site containing 3 contexts: “Federation”, “Appleshaw” and “Kimpton”. Frontend Editor works perfectly for the first context, “Federation”, but the editing button does not appear for the other 2 contexts “Appleshaw” and “Kimpton”. Has anybody else come across a similar problem of an extra not working with multiple contexts?

KR,

Andy

I see no reason why this extra wouldn’t work with a different context.

  • When you open the developer tools of your browser, are there any errors in the “Console” tab?
  • Maybe the editing button is just concealed by your own markup (e.g. a footer with a high z-index value).
  • When you look a the source of the page, do you see this part where the frontendeditor is initialized?
<script type="text/javascript">
	document.addEventListener("DOMContentLoaded", function() {
		frontendeditor.init({ ... }, [])
	});
</script>

Good point, thanks for taking the time to reply…all 3 contexts have that code inserted correctly into the page, but the non-working contexts are missing the Frontend Editor button code: there are errors in the dev console for the non-working contexts: the common.css, tinymce.min.js files etc. can’t be found. I’m following up the assumption that the non-working contexts are expecting files under subfolders …/ktf and …/as while the working context expects file at the top level…

Thanks again, Andy

…the fix was a simple edit to hard code the path for $frontendeditorAssetsPath in the frontendeditor plugin - now I can use Frontend Editor in all contexts!