--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.
To post to this group, send email to joomla-...@googlegroups.com.
That PR fixes another issue that needs to be considered when trying to revert it.
I'd rather suggest fixing the current issue instead of reverting. Well I can't say anything for sure right now as I'm out on vacation. I'll see to it likely this Sunday.
and followed the url
public function test()
{
$this->addModelPath(JPATH_ADMINISTRATOR . '/components/com_content/models/');
$model = $this->getModel('Article', 'ContentModel'); // 'contentModel' also worked (lowercase first character)
printr($model);
}
http://localhost/~izhar/staging/index.php?option=com_contact&task=contact.test
ContentModelArticle Object
(
[text_prefix:protected] => COM_CONTENT
[typeAlias] => com_content.article
[associationsContext:protected] => com_content.item
...
...
$path = JPath::find(self::addIncludePath(null, $prefix), self::_createFileName('model', array('name' => $type)));
if (!$path)
{
$path = JPath::find(self::addIncludePath(null, ''), self::_createFileName('model', array('name' => $type)));
}
...
...
$path = JPath::find(self::addIncludePath(null, $prefix), self::_createFileName('model', array('name' => $type)));
if (!$path)
{
$path = JPath::find(self::addIncludePath(null, ''), self::_createFileName('model', array('name' => $type)));
}
...
Yeah i know i can't load both (frontend and backend) instances of a model at a time. I'm not trying to do that. I just need to load the backend model in a frontend controller. The frontend model is not of interest at that point.
Can you give output of the following code exactly before addModelPath, and before and after getModel calls.
$all = JModelLegacy::addIncludePath(null, '');
And
$my = JModelLegacy::addIncludePath(null, 'MyModel');