help to better help you:
Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!
[SOLVED] problem with content plugins in venue description
[SOLVED] problem with content plugins in venue description
6 years 2 months ago
Hi, perhaps someone knows what we have to change:
using a content plugin inside the venue description show the content of the plugin in venue detail page. But the same venue description in event detail page shows only the brankets {name of the plugin}!
There must be a filter which makes that. How to allow the function of the content plugin???
Any proposal
using a content plugin inside the venue description show the content of the plugin in venue detail page. But the same venue description in event detail page shows only the brankets {name of the plugin}!
There must be a filter which makes that. How to allow the function of the content plugin???
Any proposal
Please Log in or Create an account to join the conversation.
Re: [SOLVED] problem with content plugins in venue description
5 years 11 months ago
The Venue description and Event description are processed slightly differently in JEM.
Venue (\site\views\venue\view.html.php)
Event (\site\views\event\view.html.php)
Even though triggerEvent should be calling $dispatcher->trigger, which will set Text property to prepared content, there must be some difference.
Can you give an example of description including content plugin text of Venue (working) and Event (not working)?
Venue (\site\views\venue\view.html.php)
Code:
// Generate Venuedescription
if (!$venue->locdescription == '' || !$venue->locdescription == '<br />') {
// execute plugins
$venue->text = $venue->locdescription;
$venue->title = $venue->venue;
JPluginHelper::importPlugin ('content');
$app->triggerEvent ('onContentPrepare', array ('com_jem.venue', &$venue, &$params, 0));
$venuedescription = $venue->text;
}
Event (\site\views\event\view.html.php)
Code:
if ($item->params->get('show_intro', '1') == '1') {
$item->text = $item->introtext.' '.$item->fulltext;
}
elseif ($item->fulltext) {
$item->text = $item->fulltext;
}
else {
$item->text = $item->introtext;
}
// Process the content plugins //
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onContentPrepare', array ('com_jem.event', &$item, &$this->params, $offset));
Even though triggerEvent should be calling $dispatcher->trigger, which will set Text property to prepared content, there must be some difference.
Can you give an example of description including content plugin text of Venue (working) and Event (not working)?
Please Log in or Create an account to join the conversation.
Re: [SOLVED] problem with content plugins in venue description
5 years 11 months ago
Apologies, just re-read your post again - the issue is not with venue/event description processing on their own, but specifically with display of venue description on event page. This is due to content plugin not being called on venue description (locdescription) when preparing view for event. This is a bug.
Please Log in or Create an account to join the conversation.
Re: [SOLVED] problem with content plugins in venue description
5 years 11 months ago
To resolve add the following code (beware line wrap)
to components\com_jem\views\event\view.html.php, line 166, below the block of code commented as
Code:
$tempVenue = new stdClass();
$tempVenue->text = $item->locdescription;
$tempVenue->title = $item->venue;
$results = $dispatcher->trigger('onContentPrepare', array ('com_jem.event', &$tempVenue, &$this->params, $offset));
$item->locdescription = $tempVenue->text;
$item->venue = $tempVenue->title;
Code:
// Process the content plugins //
Please Log in or Create an account to join the conversation.
Re: [SOLVED] problem with content plugins in venue description
5 years 11 months ago
wow! this works fine, excellent! Many thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.440 seconds