Open feliche93 opened 3 years ago
@feliche93 Did u solve this error? I meet same problem.
@feliche93 pls check here, hook register return a class. The document miss '()'. https://github.com/torchbox/wagtail-ab-testing/blob/34468119198164e884d0e16887ca47cbd8a57fbf/wagtail_ab_testing/test/wagtail_hooks.py#L14
I am trying to use this new awesome features but get the following error:
TypeError: can_be_triggered_on_page_type() missing 1 required positional argument: 'page_type'
. Callback traces to here:https://github.com/torchbox/wagtail-ab-testing/blob/449a237292d401dea4a9dfe0ee49381cf5a049b4/wagtail_ab_testing/views.py#L135
My
wagtail_hooks.py
looks like this:In my models.py file, I was planning to use
RoutablePageMixin
with a custom route and javascript call on button click to trigger a request to the route to log any potential conversion. Not sure how the javascript part works yet or what the best solution would be?Any help would be very much appreciated! Thanks 🙏