PDA

View Full Version : Short Code Errors


wildwebwest
02-06-2010, 03:56 PM
I created a page with short code statement that really works well - and I"m adjusting the embed-template to display the data in the way that works best for the site and this rural area:

here is my statement that is located in the page at http://www.kooskiaidahorealestate.com/city/

[wp-realty-listings fields='City' values="Cottonwood" orderby="price" orderdir="DESC" count="5" sort_type="global"]

It works really well, but an error is showing up at the top of the page

Here's the error: Warning: file_get_contents(wp-content/plugins/wp-realty/photos_url.txt) [function.file-get-contents]: failed to open stream: No such file or directory in /home/kooskiar/public_html/wp-content/plugins/wp-realty/wp-realty.php on line 2451

That line in wp-realty.php is calling out a file that it doesn't seem to be able to find called photos_url.txt

Here is the line item 2451:
$photos_url=file_get_contents("wp-content/plugins/wp-realty/photos_url.txt");

I googled the function.file-get-contents and found an entry that says the error points to a php setting: allow_url_fopen = On I tried do make an entry in the .htaccess to allow fopen to be "on" but kept getting a 500 internal server error. So I'm stumped.

Let me know if you can give me a hint of what I"m doing wrong or if the file is missing or why the error is occuring. Otherwise, love the short code. its great!

Thanks!

Jared
02-07-2010, 11:13 AM
That error is due to the fact that the server you are on does not allow URL File Access. The way to deal with this is to put an option to hide this error. As a WARNING it wont prevent the plugin from working so I've put it on the task list for the next update.

If you want I'll patch this for you.

Jared

wildwebwest
02-09-2010, 01:41 PM
We fixed this error easily without a patch by adding a blank txt file called photos_url.txt at the following path:
wp-content/plugins/wp-realty/photos_url.txt

Brian
02-23-2010, 11:07 PM
I am hitting the same error. I'm not so sure this is a server config issue though. On my system this file photos_url.txt doesn't even exist.

Here's the piece of code in reference and the path:
$photos_url=file_get_contents("wp-content/plugins/wp-realty/photos_url.txt");

Perhaps, this is an install issue with the plugin? As a workaround if you could provide us what is supposed to go in this .txt file then we can create it ourselves.

Thanks!