squeevee / flarum-ext-fancybox

Image formatting and lightbox modal using FancyBox
GNU General Public License v3.0
6 stars 5 forks source link

Flarum scrubber is effected by this extension in some posts #3

Open mikejones3 opened 5 years ago

mikejones3 commented 5 years ago
index.js:59 Uncaught TypeError: this.isEditing is not a function
    at e.<anonymous> (index.js:59)
    at e.t.<computed> [as config] (extend.js:27)
    at Object.e.attrs.config (Component.js:113)
    at mithril.js:447
    at mithril.js:1353
    at v (mithril.js:189)
    at Function.m.render (mithril.js:1353)
    at mithril.js:1567
    at v (mithril.js:189)
    at ut (mithril.js:1563)

For more info an links to examples I created an entire post here about in the flarum discussion group:

https://discuss.flarum.org/d/20064-scroll-bar-on-the-right-broken-on-one-post

squeevee commented 5 years ago

@mikejones3 I was not able to reproduce this issue on the latest release 0.2-beta. However, I was able to reproduce it on 0.1-beta, which makes sense because this error is similar to other issues with that version.

You can check which version of the extension you have installed by running

composer show squeevee/flarum-ext-fancybox

and look for the line that says "versions". If that says 0.1-beta then you can run this to change to the newer version:

composer require squeevee/flarum-ext-fancybox:">=0.2-beta"

Make sure to include the quote marks, otherwise it will not work. Please try this, clear the Flarum cache (php flarum cache:clear), re-enable the extension and let me know if the problem continues.

squeevee commented 5 years ago

MikeJones: Looks like I was on the old version just updated! I will turn the extension back on and test for a couple of days, thanks! ALso, I saw this line: flarum/core 0.1.0-beta.8 Does that mean it won't work with beta 9 ?

(https://discuss.flarum.org/d/19535-fancybox-extension-beta/39)

MikeJones: ALso after testing the extension is not working on beta 9. When I click an image it does nto pop up and I get this error: Uncaught TypeError: Cannot read property 'frameElement' of null at V.getTargetRect (position-observer.js:143) at position-observer.js:100 at va.h.fire (observable.js:81) at position-observer.js:69 at c (rate-limit.js:39) at rate-limit.js:57

(https://discuss.flarum.org/d/19535-fancybox-extension-beta/40)

This sounds like it's probably due to a buggy interaction with another extension. My hunch would be flagrow/ads, based on the error message but that's just a guess. Could you temporarily disable all third-party extensions on your site except for fancybox? If it works at that point, could you try re-enabling them one at a time until fancybox stops working again?

mikejones3 commented 5 years ago

So I just disabled the Recache plugin and enabled yours and everything works fine. So I think its the recache plugin.

mikejones3 commented 5 years ago

Looks like I am still having the original issue but with a different error. The error ironically can be seen on this page on my site: https://www.seekadventure.net/d/103-pictures-now-can-be-enlarged

Uncaught TypeError: Cannot read property 'icon' of undefined at r (tagLabel.js:29) at tagsLabel.js:14 at Array.forEach () at i (tagsLabel.js:12) at e.n.descriptionData (DiscussionTaggedPost.js:49) at e.n.content (EventPost.js:29) at e.n.view (Post.js:51) at e.render (Component.js:102) at Object.o [as view] (Component.js:189) at P (mithril.js:806)

squeevee commented 5 years ago

This actually appears to be an issue with Flarum Core. I think you will find that the scrubber would fail on that particular post even if FancyBox were disabled.

I have reported it. https://github.com/flarum/core/issues/1864

Let me know if disabling FancyBox indeed has any effect on this.