Open melat0nin opened 9 years ago
I found a solution. Here it is for future reference.
Javascript is being loaded properly. But there's an issue with PageSelector helper in Concrete5. Callback function name is not passed to sitemap search selector.
In file /concrete/core/helpers/form/page_selector.php
change line 50 to:
$html .= '<a class="ccm-sitemap-select-page" dialog-sender="' . $fieldName . '" dialog-width="90%" dialog-height="70%" dialog-append-buttons="true" dialog-modal="false" dialog-title="' . t('Choose Page') . '" href="' . REL_DIR_FILES_TOOLS_REQUIRED . '/sitemap_search_selector.php?sitemap_select_mode=select_page&cID=' . $selectedCID . '&callback='.$javascriptFunc.'">' . t('Select Page') . '</a>';
(Added callback parameter)
Of course this is simplified. You shouldn't modify /concrete folder. There are better ways to do this.
@ArniPL have you flagged this as something that should be fixed in the core?
Yes. I've created a pull request now.
It looks as though the JS in form() isn't being loaded. I've inspected using Chrome 46 and Firefox 42 and each has the table and link to the sitemap page picker, but the JS isn't in the code and so nothing is saved when a page is chosen.
Any thoughts as to why this might be?