New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No use of content triggers #399

Closed
regularlabs opened this Issue Jun 30, 2017 · 13 comments

Comments

Projects
None yet
4 participants
@regularlabs
Contributor

regularlabs commented Jun 30, 2017

For an extension of mine I rely on the Joomla content triggers (onContentAfterSave, onContentAfterDelete, onContentChangeState) to be able to store extra information.
However, K2 does not seem to use these event triggers anywhere. Meaning I am not able to implement support for K2 for this.
Please add the content triggers in the appropriate places...

@regularlabs

This comment has been minimized.

Show comment
Hide comment
@regularlabs

regularlabs Jul 1, 2017

Contributor

Also, When an item gets trashed, it now triggers the onFinderChangeState event. However, this just gives info about the publish 1/0 state. That event gives no information about the fact that it gets trashed.

And also, when a category gets trashed, it also trashes the underlying items. But there is no event trigger at all for these items.

Contributor

regularlabs commented Jul 1, 2017

Also, When an item gets trashed, it now triggers the onFinderChangeState event. However, this just gives info about the publish 1/0 state. That event gives no information about the fact that it gets trashed.

And also, when a category gets trashed, it also trashes the underlying items. But there is no event trigger at all for these items.

@nicksavov

This comment has been minimized.

Show comment
Hide comment
@nicksavov

nicksavov Jul 28, 2017

+1 for adding the content triggers

+1 for adding the content triggers

@fevangelou

This comment has been minimized.

Show comment
Hide comment
@fevangelou

fevangelou Aug 2, 2017

Member

@regularlabs Which extension are you referring to if you don't mind me asking?

Member

fevangelou commented Aug 2, 2017

@regularlabs Which extension are you referring to if you don't mind me asking?

@regularlabs

This comment has been minimized.

Show comment
Hide comment
@fevangelou

This comment has been minimized.

Show comment
Hide comment
@fevangelou

fevangelou Aug 2, 2017

Member

As you know, we extremely rarely change the DB schema in K2. In 8+ years of K2, we've done 5-6 changes, with 2 of them related to making K2 InnoDB compatible.

Wouldn't it be simpler to just query K2's tables and get the data you want? E.g. display trashed items and categories or delete either/or...

Edit: I'm guessing you want the events so you can pre-cache results in your component?

Member

fevangelou commented Aug 2, 2017

As you know, we extremely rarely change the DB schema in K2. In 8+ years of K2, we've done 5-6 changes, with 2 of them related to making K2 InnoDB compatible.

Wouldn't it be simpler to just query K2's tables and get the data you want? E.g. display trashed items and categories or delete either/or...

Edit: I'm guessing you want the events so you can pre-cache results in your component?

@regularlabs

This comment has been minimized.

Show comment
Hide comment
@regularlabs

regularlabs Aug 2, 2017

Contributor

This is about plugins getting triggered when stuff gets done.
I need my plugin to do stuff the moment an item gets trashed or deleted or other status change.
Currently my plugin, nor any other, can do stuff in the process of creating K2 items and status changes thereof.

The solution is to simply add the necessary triggers to the code of K2.

Contributor

regularlabs commented Aug 2, 2017

This is about plugins getting triggered when stuff gets done.
I need my plugin to do stuff the moment an item gets trashed or deleted or other status change.
Currently my plugin, nor any other, can do stuff in the process of creating K2 items and status changes thereof.

The solution is to simply add the necessary triggers to the code of K2.

@fevangelou

This comment has been minimized.

Show comment
Hide comment
@fevangelou

fevangelou Aug 2, 2017

Member

Since K2 is free as you know and I suppose your plans to support K2 are for the Pro version of your extension, plus I already have a huge list of tasks for K2 v2.8.0 and 2.9.0, be my guest and send a PR with the changes you like. I'll review them and if nothing breaks, I'd be happy to apply the PR.

Member

fevangelou commented Aug 2, 2017

Since K2 is free as you know and I suppose your plans to support K2 are for the Pro version of your extension, plus I already have a huge list of tasks for K2 v2.8.0 and 2.9.0, be my guest and send a PR with the changes you like. I'll review them and if nothing breaks, I'd be happy to apply the PR.

@regularlabs

This comment has been minimized.

Show comment
Hide comment
@regularlabs

regularlabs Aug 3, 2017

Contributor

Done: #403

Contributor

regularlabs commented Aug 3, 2017

Done: #403

@fevangelou

This comment has been minimized.

Show comment
Hide comment
@fevangelou

fevangelou Aug 4, 2017

Member

Accepted, thank you.

Member

fevangelou commented Aug 4, 2017

Accepted, thank you.

@fevangelou fevangelou closed this Aug 4, 2017

@fevangelou

This comment has been minimized.

Show comment
Hide comment
@fevangelou

fevangelou Aug 4, 2017

Member

BTW, I added some missing plugin group imports.

Member

fevangelou commented Aug 4, 2017

BTW, I added some missing plugin group imports.

@regularlabs

This comment has been minimized.

Show comment
Hide comment
@regularlabs

regularlabs Aug 4, 2017

Contributor

Cool :)

Contributor

regularlabs commented Aug 4, 2017

Cool :)

@nicksavov

This comment has been minimized.

Show comment
Hide comment
@nicksavov

nicksavov Aug 4, 2017

Wow, thank you Peter and Fotis!

Cheers,

Wow, thank you Peter and Fotis!

Cheers,

@agerix

This comment has been minimized.

Show comment
Hide comment
@agerix

agerix Aug 20, 2017

Thx from Better Trash and K2 user ;)

agerix commented Aug 20, 2017

Thx from Better Trash and K2 user ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment