-
AuthorPosts
-
November 9, 2014 at 11:16 pm #202574
I installed JEvents, create a calendar, a category and an event.
I also created a menu to display the monthly calendar.
When trying to access the page http://192.185.140.15/~armada/eventos , the following error occurs:Fatal error: Call to a member function set() on a non-object in /home/…./public_html/plugins/system/t3/t3.php on line 371
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
LINE 371 -> $article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}I have no idea how to fix it…
Could anyone help please?jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 10, 2014 at 7:43 am #554714<em>@maricate 452360 wrote:</em><blockquote>I installed JEvents, create a calendar, a category and an event.
I also created a menu to display the monthly calendar.
When trying to access the page http://192.185.140.15/~armada/eventos , the following error occurs:Fatal error: Call to a member function set() on a non-object in /home/…./public_html/plugins/system/t3/t3.php on line 371
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
LINE 371 -> $article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}I have no idea how to fix it…
Could anyone help please?</blockquote>
@maricate : You can fix the problem this wayOpen plugins/system/t3/t3.php file
Find and change
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
$article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}To
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
if (isset($article->params) && is_object($article->params)) $article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}
1 user says Thank You to Ninja Lead for this useful post
November 10, 2014 at 11:18 am #554745<em>@Ninja Lead 452421 wrote:</em><blockquote>@maricate : You can fix the problem this way
Open plugins/system/t3/t3.php file
Find and change
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
$article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}To
public function onContentPrepare ($context, &$article, &$params, $page = 0) {
// update params for Article View
if ($context == 'com_content.article') {
$app = JFactory::getApplication();
$tmpl = $app->getTemplate(true);
if ($tmpl->params->get('link_titles') !== NULL) {
if (isset($article->params) && is_object($article->params)) $article->params->set('link_titles', $tmpl->params->get('link_titles'));
}
}
}
</blockquote>Thank you Ninja Lead!
I follow your instructions and now its fixed and working!
🙂 -
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by maricate 10 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum