WebsiteBaker Support (2.12.x) > Modules
CKEditor WBLink does not detect modules
crnogorac081:
I will take a look, hovewer i never used OFA module before
CodeALot:
--- Quote from: crnogorac081 on February 05, 2020, 10:05:21 AM ---I will take a look, hovewer i never used OFA module before
--- End quote ---
Oh man, you should. Can't do without anymore :-) Thanks for your efforts!
EDIT: I installed a fresh WB 2.12.2 without ShortURL and the problem stays as described above here by dbs and me:
In CKEditor source, the link looks ok. In the frontend, the link is replaced by a single "#".
dbs:
This # comes from WbLinkAbstract.php line 119
--- Code: ---// set link on failure ('#' means, still stay on current page)
$sRetval = '#';
--- End code ---
Seems the following sql query has no result.
CodeALot:
--- Quote from: dbs on February 05, 2020, 10:41:48 AM ---This # comes from WbLinkAbstract.php line 119
--- Code: ---// set link on failure ('#' means, still stay on current page)
$sRetval = '#';
--- End code ---
Seems the following sql query has no result.
--- End quote ---
The same WbLinkAbstract.php is called when you want to link to an item in a News-module, and then it works OK. It fails for OFA, and I can't find why... :(
CodeALot:
Ok, I now see what's happening. Looking at the output of WbLinkAbstract.php, I get the following:
SQL call for a news post:
--- Code: ---SELECT `link` FROM `wb_mod_news_posts` WHERE `post_id`=1
--- End code ---
Resulting URL:
--- Code: ---/posts/breaking-news-1-1
--- End code ---
This works fine.
SQL for an OFA item:
--- Code: ---SELECT `link` FROM `wb_mod_oneforall_items` WHERE `item_id`=1
--- End code ---
Resulting URL:
--- Code: ---/first-item
--- End code ---
And that URL is NOT valid since it does not have the full link-path (in this case, it should have been oneforall-page/first-item )
This causes WbLinkAbstract to fail when checking the URL and returning the # instead of the actual link.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version