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 4 months 1 week ago #25671

  • jojo12
  • jojo12's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Posts: 3046
  • Karma: 45
  • Thank you received: 311
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
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR

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

[SOLVED] problem with content plugins in venue description 1 month 2 days 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 1 month 2 days 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 1 month 2 days 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 1 month 2 days ago #26168

  • jojo12
  • jojo12's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Posts: 3046
  • Karma: 45
  • Thank you received: 311
wow! this works fine, excellent! Many thanks!
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR

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

  • Page:
  • 1
Time to create page: 0.213 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......