Elv1zz/ttrss_plugin-markasread

Plugin is causing issues with preferences screen

Closed this issue · 6 comments

I found this today while trying to change some settings. Occasionally I will change a setting, like a feed icon, and my browser will attempt to download a php file. I later found the "System" tab and saw a giant list of errors caused by the markasread plugin. I disabled the plugin and found that the issues I was having with preferences were gone.

Reproduce bug:
Enable markasread plugin
Enter preferences
Go to the "System" tab
There should already be errors like the following:
E_WARNING (2) classes/pref/feeds.php:467 Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/ttrss/plugins/markasread/init.php:43)

Additional Bug (appears to be firefox only):
Go to the feeds tab in preferences
Choose a feed to edit
Choose a new picture to replace the icon (browse to a local image)
Click "Replace"
Firefox should try to download "backend.php"
I believe the upload is still successful, however it should be displaying a notice about being done instead of downloading a php file.

The errors on the System tab are happening after loading preferences in both browsers.

I cannot reproduce this issue on my installation.
Can you please disable all other plugins you have enabled to verify it really is created by markasread?

I disabled all plugins that I could, and was still getting the problem. I
deleted the plugin and used the git command to re-download it, and still
had the problem. After some digging around, I found the issue thanks to
fox's comment on this thread:

http://tt-rss.org/forum/viewtopic.php?f=22&t=1548&start=30

The short of it is, after ?> at the end of init.php, there are one or
two blank lines. Removing this line or lines fixes the issue. Looking at
the code on github, there appears to be an empty line (42). For some
reason I was also having a blank line 43 as well, which was in the original
error.

Thanks for debugging!
I suspected this newline to be problematic when I saw that your problem was around the end of the code ;-) However on my system I did not get any errors/warnings from it.

Newest revision should fix it. Is the second issue also solved by this?

Yep, looks like that fixes both issues.

Sorry, I thought closing it would mark it as fixed. I'll leave it open for you to handle.

(Closing it should mark it as fixed, meaning that the issue goes to the "closed issues" section. Maybe you have to refresh the issue page afterwards.)
Closed