WebsiteBaker Support (2.12.x) > Modules
CKEditor WBLink does not detect modules
CodeALot:
The source of the problem is the fact that OneForAll does not populate the "link"-field with the actual full link with the /pages/ directory as a base. It only saves the page-url, not the path.
So, the only way to fix this is to alter WbLinkAbstract.php in such a way that:
* The link is checked
* If the link check fails, look for the page_title based on the page_id
* Check if the link exists if you add page_title.'/'. before the link (which will be the case in OneForAll-sections)
...and I can't get that to work properly :-(
crnogorac081:
hello,
In OFA module file , WBReorg.php line 50
const ACCESSFILES_SUBDIR = '';
change to
const ACCESSFILES_SUBDIR = '/ofa'; or whatever ofa item folder is in /Pages
someone test
CodeALot:
--- Quote from: crnogorac081 on February 05, 2020, 12:15:05 PM ---hello,
In OFA module file , WBReorg.php line 50
const ACCESSFILES_SUBDIR = '';
change to
const ACCESSFILES_SUBDIR = '/ofa'; or whatever ofa item folder is in /Pages
someone test
--- End quote ---
Tested. Does not do anything, it seems.
crnogorac081:
if you have for example OFA item id = 1, what is his real path from /pages direcotry ?? root/pages/ofa/item-link-1.php ?
CodeALot:
--- Quote from: crnogorac081 on February 05, 2020, 12:45:40 PM ---if you have for example OFA item id = 1, what is his real path from /pages direcotry ?? root/pages/ofa/item-link-1.php ?
--- End quote ---
Correct.
pages/ofa-module-name/titlelink-of-ofa-item.php
What WbLinkAbstract now tries to do, is create
pages/titlelink-of-ofa-item.php
For my own situation, I altered WbLinkAbstract so that it checks for the module name, and if it's the OFA-module name, it adds an extra path to the link
--- Code: ---
if ($this->oDb->TablePrefix.$this::TABLE_NAME == 'wb_mod_oneforall_items') { $extrapath="oneforall/"; }
$sLink = $extrapath.$sLink;
--- End code ---
Not pretty, but it works for me. There should be a more elegant way to solve this, though :-)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version