openy icon indicating copy to clipboard operation
openy copied to clipboard

PEF: following the content changes

Open AndreyMaximov opened this issue 7 years ago • 13 comments

First of, I would love to say big thanks to the team that has been working on PEF. You guys do a great job!

Meanwhile, it seems that some very important functionality is lost and the framework cannot be used out of the box. The thing is none of the updates of the data the new schedules are built upon are taken into account. E.g. if you update a class, it won't get updated in the schedules. If you rename a category (activity content type) the filter on the schedule page will update, but there won't be any classes matching that category.

That's so due to the fact the repeat_schedule module relies on the openy_session_instance implementations of them hooks that were not designed to work with the denormalized structure of PEF table. These hooks just ignore some of the changes as they are not important for session_instance ideology.

I think PEF must implement its own hooks, because:

  1. PEF is so much better than session_instance
  2. There are no hooks at all if there is no session_instance module enabled (which is not a dependency of PEF)
  3. It seems openy_session_instance thing is going to be deprecated soon (see item 1)

I see the word "framework" is being used here, but the vanilla Open Y is not going to work with PEF unless the default correct implementations of entity insert/update/delete hooks are here.

Thanks, Andrey

AndreyMaximov avatar Oct 04 '18 19:10 AndreyMaximov

cc @ygerasimov , @podarok , @YMCA-GTC

ddrozdik avatar Oct 05 '18 13:10 ddrozdik

Thank you @AndreyMaximov . Would you and @Sanchiz recommend that 5J take this on with part of Open Y 2.0, or that I assign it to IXM instead to resolve?

YMCA-GTC avatar Oct 08 '18 16:10 YMCA-GTC

@YMCA-GTC we'll work on it as a part of Open Y 2.0. cc @ddrozdik @AndreyMaximov

alexschedrov avatar Oct 08 '18 16:10 alexschedrov

Thanks 5J team!

YMCA-GTC avatar Oct 08 '18 16:10 YMCA-GTC

@Sanchiz any updates on this task?

podarok avatar Apr 05 '19 08:04 podarok

@AndreyMaximov @hamrant please give a status update on this and what has been included into the Open Y 2.0 release.

alexschedrov avatar Apr 05 '19 10:04 alexschedrov

@Sanchiz @podarok I only know about these 2

  • hook_openy_repeat_results_alter
  • hook_query_openy_repeat_get_data_alter

See https://github.com/ymcatwincities/openy/pull/1486

Anyway, they are clearly not enough, for example, hook_alter can be implemented here:

  • https://github.com/hamrant/openy/blob/29f540fb8012977159d378e442403e35ca365554/modules/custom/openy_repeat/src/Controller/RepeatController.php#L233 (Refactor to dynamic query + tag)
  • https://github.com/hamrant/openy/blob/29f540fb8012977159d378e442403e35ca365554/modules/custom/openy_repeat/src/Controller/RepeatController.php#L248
  • I think most of the methods from this class should provide an opportunity to alter data
  • Same thing for https://github.com/hamrant/openy/blob/29f540fb8012977159d378e442403e35ca365554/modules/custom/openy_repeat/src/Plugin/Block/RepeatSchedulesBlock.php#L19
  • And for https://github.com/hamrant/openy/blob/29f540fb8012977159d378e442403e35ca365554/modules/custom/openy_repeat/src/Plugin/Block/RepeatSchedulesLocBlock.php

hamrant avatar Apr 05 '19 10:04 hamrant

Nice, thank you @hamrant

I see that we need a user story here and a correct tagging @AndreyMaximov @Sanchiz could you write a user story for me and @YMCA-GTC @ymcagtc @paige-kiecker to be able to include in Trello? Thank you in advance

podarok avatar Apr 05 '19 14:04 podarok

@podarok @YMCA-GTC @ymcagtc @paige-kiecker There is a PR, that was merged, https://github.com/ymcatwincities/openy/pull/1391. It doesn't fully resolve the issue but makes a big step forward in this direction.

There is also a comment that explains why we couldn't finish the work and what we need to finish it https://github.com/ymcatwincities/openy/pull/1391#issuecomment-450485039

Sorry @hamrant but it seems your comment is about something else. The extendable PEF is a very important topic though, I'll take care of the user story.

AndreyMaximov avatar Apr 16 '19 13:04 AndreyMaximov

P.S. sorry again @hamrant :-) Your comment and the mentioned changes relate to the issue indirectly.

AndreyMaximov avatar Apr 16 '19 13:04 AndreyMaximov

Thanks for the follow up @AndreyMaximov. If you could get that user story to @podarok and me this week, we will get it on our roadmap.

paige-kiecker avatar Apr 16 '19 13:04 paige-kiecker

Any news @AndreyMaximov ?

podarok avatar Aug 29 '19 09:08 podarok

@AndreyMaximov & @Sanchiz - it doesn't look like the user story was provided for this item. We're working on our backlog refinement, and I'd like to get this added. Can you please provide the user story if this issue is still relevant?

sarah-halby avatar Jan 29 '21 16:01 sarah-halby