- Issue created by @mikemadison
- First commit to issue fork.
- 🇮🇳India rajeshreeputra Pune
Thanks @mikemadison, the proposed resolution sound good.
- 🇦🇹Austria drunken monkey Vienna, Austria
drunken monkey → made their first commit to this issue’s fork.
- Merge request !10Resolve #3481216: “DivisionByZeroError When Searching” → (Merged) created by drunken monkey
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks for reporting this problem. However, it seems there are actually two unrelated problems:
- The
DivisionByZeroError
you mention just seems to be triggered by a view having a page size of 0 (i.e., showing no results at all). While we of course want to prevent this fatal error, it would occur no matter whether or not you’ve configured the Searchstax module. - Unrelatedly, it would of course make sense to spot early on in
_searchstax_add_tracking()
that no analytics key is present and return without any further processing. (The check is currently unnecessarily far down in the function.)
Should both be fixed in this MR. Please test/review.
- The
- 🇺🇸United States mikemadison Seattle, WA
the patch applies cleanly to dev.
applying the patch seems to address the issue i was having. thanks for the quick turn around!
- 🇮🇳India rajeshreeputra Pune
The patch is addressing the problem, but it seems that the logic is entirely contained within the `.module` file.
@drunken monkey, would it be possible to move all the methods, except for hooks, into a service?
I suggest doing this not in the same pull request, but in a separate issue. What are your thoughts on this approach? -
drunken monkey →
committed 1e83e9c0 on 1.x
Issue #3481216 by drunken monkey, mikemadison: Fixed DivisionByZeroError...
-
drunken monkey →
committed 1e83e9c0 on 1.x
- 🇦🇹Austria drunken monkey Vienna, Austria
Great to hear, thanks for testing! Merged.
@rajeshreeputra: Sure, sounds good. Please feel free to create an issue for that.
- 🇮🇳India rajeshreeputra Pune
Created ✨ Refactor .module logic Active for refactoring.
Automatically closed - issue fixed for 2 weeks with no activity.