Closed (fixed)
Project:
Facets
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jan 2016 at 07:01 UTC
Updated:
26 May 2016 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
borisson_Writing a testcase to test the expected behavior.
Comment #3
borisson_I'm actually not sure what the expected result for the third added test here should be. At least there's a way to test this now. That's great.
Setting to NR so the bot can take a look at the patch, but we first need to have some consensus on how to resolve this.
Comment #6
borisson_Comment #7
borisson_The test added here should be moved to the
ProcessorIntegrationTest, introduced in #2680301: Expand processor test coverage..We should also still figure out how to fix this issue.
Comment #8
borisson_I did what I said in #7. Moved tests.
Comment #11
borisson_We discussed this and I'll post a patch with some work tomorrow.
Comment #12
borisson_Just checking in some work. Unit tests already pass again. Everything else is still very much broken.
Comment #15
borisson_This fixes more of the tests, still not ready to actually review.
Comment #18
borisson_Saving works again, but there's a problem in the config that I can't figure out yet.
Trying to figure out how to fix that. I still have to figure out how to do multiple sorts.
Comment #21
evaldas.uzkurasMaybe we should save processors config directly to processors instead of created new dimension in array with key 'settings',
I have added a proposal, how to make it.
Using that way, we can get config's value using:
Comment #22
evaldas.uzkurasI have made the proposal for applying multiple sorts.
Maybe it would be helpful.
Comment #23
borisson_Not sure about #21, I'll look at that suggestion tomorrow.
#22 looked great and I implemented that and adapted the unit tests as well.
Comment #26
borisson_Comment #27
borisson_Comment #32
borisson_#27 doesn't look like it'll help. So the next patch'll be based on #26.
Comment #33
borisson_I spent more time on this, but I can't figure out how to fix those config errors.
I changed some small things for coding standards in the patch.
Comment #36
borisson_I rolled a new patch after the last commits, still no idea how to resolve the config errors.
Comment #39
borisson_Adding to the plugin_type file
Comment #42
borisson_reroll.
Comment #45
borisson_This is the correct patch, that was a search api patch.
Comment #48
borisson_Needed a reroll, so let's try again.
Comment #51
borisson_Rerolling is not my strongest suit.
Comment #54
borisson_We should be back to only having config errors.
Comment #57
borisson_Comment #60
borisson_I can't figure it out, but this line is not needed, so removing that. Still the same fails.
Comment #61
borisson_Marking this with higher priority. It's a big config change that needs to be fixed.
Comment #62
strykaizerComment #63
borisson_This needed a rebase.
Comment #66
borisson_Another reroll.
Comment #69
strykaizerFollowing code is another approuch, no seperate sorting plugin used here.
This should work, no tests fixxed yet, needs work. Also tests from #66 should be ported in this patch if we pick this route.
Comment #72
borisson_Ported test from #66, fixed unit tests as well.
Comment #73
borisson_Comment #78
borisson_I don't see the fail in testResultSorting locally.
Comment #81
strykaizerComment #82
borisson_This looks great, but since this is such a big change, I'll leave it open for a couple of days for additional feedback. I love how the last patch is less than half the size of the one in #66 and that is deletes a bunch of code as well.
Comment #83
claudiu.cristeaMinors.
Let's investigate this in a separate issue and refer the new issue in the @todo. I think it's important to find out what's going on with that as it might affect other functionalities.
Until fixing
getProcessorsByStage(): Let's move this outsideforeach () {...}. It doesn't make sense to call that method on every processor. We get the list once, before foreach.We try to not call any function/method during throwing an exception because that can cause other unexpected errors, obscuring the main exception. Just use the string in double quotes an inject variables with {}. Probably
"The processor {$processor->getPluginDefinition()['id']} has a build definition but doesn't implement the required BuildProcessorInterface interface"?Is this module in BC mode? Hope not, otherwise we break other modules implementing this interface.
Comment #84
borisson_#83:
3. Oh, I didn't realize that, we should do that in other places as well.
4. We've released 2 alpha versions and haven't promised to keep bc yet, so we're good on that front.
Comment #85
claudiu.cristeaApart from #83, I tested the patch and works as expected.
Comment #86
borisson_#83
Thanks for the review @claudiu.cristea!
Comment #87
claudiu.cristea@borisson_, thank you.
Hm. I still believe that this comment is valuable. Why? Because after #2722267: Fix Facet::getProcessorsByStage is fixed we need to get back here and fix this (probably in a follow-up). So, I would keep the @todo comment and add also a
@see https://www.drupal.org/node/2722267. In this case we need to indent the 2nd line of the @todo comment by 2 spaces.Comment #88
borisson_Sure, that makes sense.
Comment #89
claudiu.cristeaComment #91
borisson_Comitted and pushed, thanks for the patches and reviews!