Keyword

Can't fire onAfterK2Save in plugin

  • Toby Mathews
  • Toby Mathews's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #102015 by Toby Mathews
Can't fire onAfterK2Save in plugin was created by Toby Mathews
Hi there,

I've created a plugin based on the K2 example plugin. I've copied the structure from example.php in the download, but added:

function onAfterK2Save(&$item, $isNew) {
echo 'onAfterK2Save';
die();
return true;
}

Obviously that's not what I want to happen, but I'm so far failing to get the code to execute at all. Is there something I'm missing? The rest of my functionality is in onK2PrepareContent, and that works fine.

This is using the most recent versions of K2 and Joomla!

Thanks,

Toby

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

More
12 years 1 month ago #102016 by Lefteris
Replied by Lefteris on topic Re: Can't fire onAfterK2Save in plugin
Hi. This event is triggered when the item is saved. Check that the class name of your plugin is correct.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Toby Mathews
  • Toby Mathews's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #102017 by Toby Mathews
Replied by Toby Mathews on topic Re: Can't fire onAfterK2Save in plugin
Thanks for your answer, I think you may be on to something, the things I thought were working actually aren't.

How do I determine the correct class name?

Thanks,

Toby

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


Powered by Kunena Forum