- Posts: 1
COMMUNITY FORUM
JFile: :read: Unable to open file:
- fbugalla
- Topic Author
- Offline
- New Member
I searched the forum and found another user with the same error but no helpful answer.
I am using Joomla 3.1.5 and JWSRF has been working nicely till now.
The error is generated by the module because when I unpublish it the warning message also disappears.
You can have a look at: www.escolaloreig.cat.
Thanks in advance for your help.
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
Please Log in or Create an account to join the conversation.
- Daphne Christoforidou
- Offline
- New Member
- Posts: 14
Please Log in or Create an account to join the conversation.
- Daphne Christoforidou
- Offline
- New Member
- Posts: 14
Please Log in or Create an account to join the conversation.
- Daphne Christoforidou
- Offline
- New Member
- Posts: 14
I'm afraid it's actually a bug of the module. In my case what caused the "JFile::read Unable to open file" warning was the simple fact that i had a line break after my rss feed inside the module in field "Enter RSS feeds to fetch (one feed per line)".
So this line break was interpreted as a new rss file and the code was trying to open it - hence the Unable to read file warning. Inside module's helper.php in line 122 the array of urls contains one more value in case the user has accidentally entered a line break. This extra url value causes the error.
So I just deleted the extra line breaks inside the module field and the warning went away.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
- Posts: 8743
I'm posting the solution (at least in my case) here in case it helps anyone.
I'm afraid it's actually a bug of the module. In my case what caused the "JFile::read Unable to open file" warning was the simple fact that i had a line break after my rss feed inside the module in field "Enter RSS feeds to fetch (one feed per line)".
So this line break was interpreted as a new rss file and the code was trying to open it - hence the Unable to read file warning. Inside module's helper.php in line 122 the array of urls contains one more value in case the user has accidentally entered a line break. This extra url value causes the error.
So I just deleted the extra line breaks inside the module field and the warning went away.
Hi there, Can you, please, put a picture, what is that that you deleted in line 122 in this file helper.php ?
Thak you
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- huki
- Offline
- New Member
- Posts: 13
Too bad there isn't a srcipt in the module that remove empty line when we save it!
Please Log in or Create an account to join the conversation.
- twarfield
- Offline
- New Member
- Posts: 4
If you are using Simple RSS Feed Reader and there is NO FILENAME after the "Unable to open file:" error message, it is probably because you have an extra blank line in your list of feeds, where it says "Enter RSS feeds to fetch (one feed per line)". This can be fixed by removing the extra blank line, or by applying a patch (see below)
If there IS a filename after the error message, it means it is an invalid feed. Try opening the feed directly in a separate browser window.
SUGGESTION:
The "extra blank line" problem can be permanently fixed by modifying modules\mod_jw_srfr\helper.php, changing line 128 from
$result[$id] = JFile::read($feed);
if (""<$feed) { $result[$id] = JFile::read($feed);}
-TW
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
- Posts: 8743
Thanks for sharing this. However the recommended solution is to remove the empty lines in the feeds field and not hack the extension.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.