Keyword

JFile: :read: Unable to open file:

  • fbugalla
  • fbugalla's Avatar Topic Author
  • Offline
  • New Member
More
11 years 1 month ago #53639 by fbugalla
JFile: :read: Unable to open file: was created by fbugalla
Hello,
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
  • Yiota's Avatar
  • Visitor
11 years 1 month ago #53640 by Yiota
Replied by Yiota on topic Re: JFile: :read: Unable to open file:
Have you upgraded to the latest version?

Please Log in or Create an account to join the conversation.

  • Daphne Christoforidou
  • Daphne Christoforidou's Avatar
  • Offline
  • New Member
More
11 years 4 days ago #53641 by Daphne Christoforidou
Replied by Daphne Christoforidou on topic Re: JFile: :read: Unable to open file:
I have the latest version of the module installed in Joomla 3.2 and I get the same warning message. Do you have any idea what causes it ?

Please Log in or Create an account to join the conversation.

  • Daphne Christoforidou
  • Daphne Christoforidou's Avatar
  • Offline
  • New Member
More
11 years 4 days ago #53642 by Daphne Christoforidou
Replied by Daphne Christoforidou on topic Re: JFile: :read: Unable to open file:
Just an observation in case it helps anyone understand the issue: if you turn on caching in Joomla Global Configuration (Conservative Caching) the warning goes away..

Please Log in or Create an account to join the conversation.

  • Daphne Christoforidou
  • Daphne Christoforidou's Avatar
  • Offline
  • New Member
More
11 years 4 days ago #53643 by Daphne Christoforidou
Replied by Daphne Christoforidou on topic Re: JFile: :read: Unable to open file:
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.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #53644 by Lefteris
Replied by Lefteris on topic Re: JFile: :read: Unable to open file:

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.

More
10 years 4 months ago #55902 by huki
Replied by huki on topic JFile: :read: Unable to open file:
Thanks a lot Daphne for the solution! It also solved my warnings!
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.

More
9 years 4 months ago #145620 by twarfield
Replied by twarfield on topic JFile: :read: Unable to open file:
I know this is an old thread but just in case someone still gets this error message, as I did.

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);
to
if (""<$feed) { $result[$id] = JFile::read($feed);}


-TW

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #145635 by Lefteris
Replied by Lefteris on topic JFile: :read: Unable to open file:
@twarfield

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.


Powered by Kunena Forum