MyBB Community Forums

Full Version: MyAlerts v2.0.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyAlerts breaks the image attachments on my forum. When MyAlerts is activated and installed, I get the following PHP error whenever trying to view my image attachments:

'The image <image path> cannot be displayed because it contains errors.'

When viewing the inline attachment in a forum post, I just get a small empty box. No image. When going to it directly via attachment.php I just get a blank, black screen in Google Chrome, but with Firefox the above error is displayed. 

This happens upon the fread() PHP function in attachment.php on line 213:

           echo fread($handle, 8192);

I spent hours trying to debug this to figure out what was causing the error, and I have absolutely no clue what is causing the conflict.


Any ideas?
(2017-10-23, 09:37 PM)niere8 Wrote: [ -> ]Hi Euan, can you tell me where edit {$alert['received_at']} variable?

Because in alert rows I have an error where there is time of alert received, like: "xxxx replied to your thread "yyyy". There may be more posts after this. <span title="">Today</span>"

I would like delete "span title", thank you
Try using the current version from GitHub, here: Download ZIP
(2017-10-24, 09:38 AM)rrand Wrote: [ -> ]MyAlerts breaks the image attachments on my forum. When MyAlerts is activated and installed, I get the following PHP error whenever trying to view my image attachments:

'The image <image path> cannot be displayed because it contains errors.'

When viewing the inline attachment in a forum post, I just get a small empty box. No image. When going to it directly via attachment.php I just get a blank, black screen in Google Chrome, but with Firefox the above error is displayed. 

This happens upon the fread() PHP function in attachment.php on line 213:

           echo fread($handle, 8192);

I spent hours trying to debug this to figure out what was causing the error, and I have absolutely no clue what is causing the conflict.


Any ideas?

Very odd. I haven't received any reports relating to this before, and MyAlerts doesn't do anything relating to attachments at all. I'll have to have a look and see if I can replicate this. Any chance you can share your forum's URL and a link to an example broken attachment/the thread it's posted in?
(2017-10-24, 06:46 PM)rrand Wrote: [ -> ]MyAlerts breaks the image attachments on my forum. When MyAlerts is activated and installed, I get the following PHP error whenever trying to view my image attachments:

'The image <image path> cannot be displayed because it contains errors.'

When viewing the inline attachment in a forum post, I just get a small empty box. No image. When going to it directly via attachment.php I just get a blank, black screen in Google Chrome, but with Firefox the above error is displayed. 

This happens upon the fread() PHP function in attachment.php on line 213:

           echo fread($handle, 8192);

I spent hours trying to debug this to figure out what was causing the error, and I have absolutely no clue what is causing the conflict.


Any ideas?
[quote pid='1287234' dateline='1508870803']
Very odd. I haven't received any reports relating to this before, and MyAlerts doesn't do anything relating to attachments at all. I'll have to have a look and see if I can replicate this. Any chance you can share your forum's URL and a link to an example broken attachment/the thread it's posted in?
[/quote]

Sure, here's the thread:
http://www.conspiracists.com/Thread-Alerts-Test

And here's the attachment:
http://www.conspiracists.com/attachment.php?aid=11

You have to view the attachment in Firefox to see the error.

I just verified by adding the image. It was an inline image and no errors. Then I activated MyAlerts, and now it's broken. I didn't do anything else.
Can you possibly attach the image you're testing with here so that I can try and replicate the issue as closely as possible?

My live site is running MyAlerts and as you can see here, attachments are working fine there: https://www.mybbstuff.com/thread-1260.html - attachment: https://www.mybbstuff.com/attachment.php?aid=28

Are you running any other plugins? Which version of PHP are you using? Can you also look at the raw file in the "uploads" folder in FTP (it'll be named something like "201710/post_xxxx.attach") and see if it's corrupted or not?
(2017-10-25, 05:28 PM)Euan T Wrote: [ -> ]Can you possibly attach the image you're testing with here so that I can try and replicate the issue as closely as possible?

My live site is running MyAlerts and as you can see here, attachments are working fine there: https://www.mybbstuff.com/thread-1260.html - attachment: https://www.mybbstuff.com/attachment.php?aid=28

Are you running any other plugins? Which version of PHP are you using? Can you also look at the raw file in the "uploads" folder in FTP (it'll be named something like "201710/post_xxxx.attach") and see if it's corrupted or not?

Sure, but it happens with any image.

[attachment=39452]
This is the image I downloaded from my Uploads folder.

I also have a PDF attachment on my site, and that is not broken.

PHP version: 5.4.45

I just right-clicked and saved the image.

On my local drive the image was named the same as the original:

ifrewup.jpg

The good and working image is only 2,417 bytes, but the broken image is 23,589 bytes.
Interesting. MyAlerts doesn't do anything associated with attachments at all. Are you using the current code from GitHub? I'll have a look into this anyway, but I'm going on vacation for a week so it won't be until I'm back.
(2017-10-26, 06:40 PM)Euan T Wrote: [ -> ]Interesting. MyAlerts doesn't do anything associated with attachments at all. Are you using the current code from GitHub? I'll have a look into this anyway, but I'm going on vacation for a week so it won't be until I'm back.

Okay. FYI, I disabled every plugin except for myalerts and it still happens.
I am having an issue with my alerts...

"MentionMe (3.1.4)" & "Thank You/Like System (2.1.0)" alerts are intermittent at best - sometimes you get alerts sometimes you don't

Any ideas what might be wrong?

MyAlerts (2.0.3)
MyBB Version (1.8.12)
PHP Version (5.6.31)
MySQL 10.1.24
(2017-10-27, 05:59 PM)NotAdmin Wrote: [ -> ]I am having an issue with my alerts...

"MentionMe (3.1.4)" & "Thank You/Like System (2.1.0)" alerts are intermittent at best - sometimes you get alerts sometimes you don't

Any ideas what might be wrong?

MyAlerts (2.0.3)
MyBB Version (1.8.12)
PHP Version (5.6.31)
MySQL 10.1.24


Bumping this with a note that the recent the MentionMe update (3.2.0) seems to have cured the fault of intermittently not providing alerts.  Still having the issue with "Thank You/Like System (2.1.0)" though.  I guess this is an issue with that plugin, so will make a quick note on that thread

And separate to the above I have a request - can the alerts be made so that they clear when the member has visited the page which the alert is on?  So at the moment, I'm constantly being directed to posts where I have been quoted or "mentioned" which I have already read - rather it not be applied to "thankyou/ likes" but to clear the rest would be great!
(2017-11-05, 11:19 PM)NotAdmin Wrote: [ -> ]
(2017-10-27, 05:59 PM)NotAdmin Wrote: [ -> ]I am having an issue with my alerts...

"MentionMe (3.1.4)" & "Thank You/Like System (2.1.0)" alerts are intermittent at best - sometimes you get alerts sometimes you don't

Any ideas what might be wrong?

MyAlerts (2.0.3)
MyBB Version (1.8.12)
PHP Version (5.6.31)
MySQL 10.1.24


Bumping this with a note that the recent the MentionMe update (3.2.0) seems to have cured the fault of intermittently not providing alerts.  Still having the issue with "Thank You/Like System (2.1.0)" though.  I guess this is an issue with that plugin, so will make a quick note on that thread

And separate to the above I have a request - can the alerts be made so that they clear when the member has visited the page which the alert is on?  So at the moment, I'm constantly being directed to posts where I have been quoted or "mentioned" which I have already read - rather it not be applied to "thankyou/ likes" but to clear the rest would be great!

It's been a planned feature for a while, but I've not yet gotten around to implementing it.