HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
168 stars 19 forks source link

Newsfeed isn't working as expected #100

Closed zenkeku closed 1 year ago

zenkeku commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Refer to image. I don't have the knowledge to describe further.

NOTE! Only happens if Farsi is set as default language.

To Reproduce Steps to reproduce the behavior: Click on "newsfeed" Also, trying to add new feed results in second screenshot

Expected behavior A clear and concise description of what you expected to happen. No scary boxes.

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2023-03-14 at 10 21 43 AM Screenshot 2023-03-14 at 10 24 45 AM

Desktop (please complete the following information):

HugoFara commented 1 year ago

Hi!

The implementation of news fees is quite bad (undocumented and unreadable code), so I consider this feature legacy and I don't want to spend time fixing it, sorry. For now I advise not to use it.

That being said, I tried to make the code at least readable, so I pushed a bunch of edits, you can try to use 18edb02, it includes a bug fix that may solve your issue.

maanh96 commented 1 year ago

Hello, not sure if this fixes your problem but I get the feeds working by changing line #475 (#487 in the latest version) in do_feeds.php from if($currentfeed==0 || strpos($temp, $currentfeed)===false) { to if($currentfeed==0 || strpos($temp, $currentfeed)===false || strpos($temp, $currentfeed)==0) {

HugoFara commented 1 year ago

Hi, thanks @maanh96 for your hint! This issue should be fixed now, as well as many others, but the news feed is still quite buggy unfortunately.