Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] problem with content plugins in venue description

[SOLVED] problem with content plugins in venue description 7 months 1 week ago #25671

  • jojo12
  • jojo12's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 3091
  • Karma: 45
  • Thank you received: 327
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
Testing JEM 2.3.0 beta3 local on clean latest Joomla (3.9.11) Protostar php7.3.8 (no mails)

Please Log in or Create an account to join the conversation.

[SOLVED] problem with content plugins in venue description 3 months 4 weeks ago #26164

The Venue description and Event description are processed slightly differently in JEM.
Venue (\site\views\venue\view.html.php)
// 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)
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.

[SOLVED] problem with content plugins in venue description 3 months 4 weeks ago #26165

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.

[SOLVED] problem with content plugins in venue description 3 months 4 weeks ago #26166

To resolve add the following code (beware line wrap)
$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;
to components\com_jem\views\event\view.html.php, line 166, below the block of code commented as
// Process the content plugins //

Please Log in or Create an account to join the conversation.

[SOLVED] problem with content plugins in venue description 3 months 4 weeks ago #26168

  • jojo12
  • jojo12's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 3091
  • Karma: 45
  • Thank you received: 327
wow! this works fine, excellent! Many thanks!
Testing JEM 2.3.0 beta3 local on clean latest Joomla (3.9.11) Protostar php7.3.8 (no mails)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.208 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......