Conflict between page_selector and mceEditor
Permalink
Hi everyone.
First of all, thanks to the team of C5 for giving us such a wonderful piece of software.
But... I have found a little bug! (lol)
I came across this annoying conflict writing a single page in dashboard for a package: if you instanciate a "page selector" AND a "mceEditor" (tinymce) in the same page the very first element will never work because the js function that both the elements expose as callback to the pick-a-page popup is named "ccm_selectSitemapNode".
In my page I have a "page selector" before an "mceEditor", when the user clicks on the page selector a popup appears and allows the user to pick a page. When it closes, the page name is written as a link inside the mceEditor field instead of being written in the "page selector".
Anyone knows how to solve this conflict in an elegant way?
First of all, thanks to the team of C5 for giving us such a wonderful piece of software.
But... I have found a little bug! (lol)
I came across this annoying conflict writing a single page in dashboard for a package: if you instanciate a "page selector" AND a "mceEditor" (tinymce) in the same page the very first element will never work because the js function that both the elements expose as callback to the pick-a-page popup is named "ccm_selectSitemapNode".
$psel = Loader::helper('form/page_selector'); print $psel->selectPage('displayPagesCID', $itempg->cParentID);
In my page I have a "page selector" before an "mceEditor", when the user clicks on the page selector a popup appears and allows the user to pick a page. When it closes, the page name is written as a link inside the mceEditor field instead of being written in the "page selector".
Anyone knows how to solve this conflict in an elegant way?
It's not the most elegant solution because I had to touch the core file /concrete/core/helpers/form/page_selector.php
I renamed the function at line 74 to "ccm_selectSitemapNodeFromPageSelector" and I added to the link that opens the pick-a-page popup at line 50 the parameter
&callback=ccm_selectSitemapNodeFromPageSelector
awful enough to gain a slap in my own face, but it works.
Maybe it helps