Skip to content

[Sprint/PinkPanther](fix): Stripping out blog body upon export.

Ben requested to merge fix/blog-paywall-1916 into master

Closes #1916 (closed)

Summary

Blog paywalls are broken, it shows the text when you access the page, even if it should be behind a paywall

Solution

$this->_eventsDispatcher->trigger('export:extender', 'blog', [ 'entity' => $this ], []) is not being triggered as was intended, it appears that it is not registered correctly at, as the EventDispatcher never sees it. https://gitlab.com/minds/engine/blob/master/Core/Wire/Paywall/Events.php#L70 is not used by any other classes, so the solution I believe is to move the code into the blog namespace.

From left to right

  • 1 - Owner account.
  • 2 - Not logged in.
  • 3 - Other account.

image

To test

  1. Make a blog, put it behind a paywall
  2. Check you can view the content on the owner account.
  3. Check that you cannot access the content when logged out.
  4. Check that you cannot access the content when on a secondary account that has not wired tokens previously to your primary.
  5. Pay for the blog on that account, and verify you can access it (if you need some, drop me a message).
Edited by Ben

Merge request reports

Loading