I get that notice when there is a link to an article inserted using article editor button and the article is being viewed outside com_content (in my case in community builder profile). Through that button the link inserted is no formated using JRoute nor ContentHelperRoute and hasn't a menu item attached. If you follow the link you go to the correct article but the link is different depending where you are viewing it.
I've made overrides for three core files and the problem is totally fixed:
File: administrator/components/com_content/models/articles.php Line 158, added select the category_alias.
Code: Select all
$query->select('c.title AS category_title,a.alias as category_alias');
File: administrator/components/com_content/views/articles/tmpl/modal.php
- Import ContentHelperRoute class
- In the foreach loop, the onclick function is now:
Code: Select all
onclick="if (window.parent) window.parent.<?php echo $function;?>('<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->id.':'.$item->article_alias,$item->catid.':'.$item->category_aliase)); ?>', '<?php echo $this->escape(addslashes($item->title)); ?>');"
File: plugins/editors-xtd/article/article.php, the javascript function is now:
Code: Select all
$js = "
function jSelectArticle(article_route, title, object) {
var tag = '<a href='+'\"'+article_route+'\">'+title+'</a>';
jInsertEditorText(tag, '".$name."');
SqueezeBox.close();
}";