WordPress.org

Ready to get started?Download WordPress

Forums

Alfie WP Weather
[resolved] Subdirectory Bug (27 posts)

  1. pkd
    Member
    Posted 1 year ago #

    I'm setting up an intranet using Alfie Weather. Really love the widget and the client loves it too. However the widget does not load on a subdirectory. I installed WP in a subdirectory called 'test' to debug this issue in a fresh WP install. localhost/test/

    I get a 404 Not Found error for getfeed.php. It is pointing to the root directory of the localhost, instead of the WP root, '/test/' in my case. So, it's looking for /wp-content/plugins/alfie-wp-weather/getfeed.php in the localhost root.

    When moved WP to the localhost root, it worked fine.

    http://wordpress.org/extend/plugins/alfie-wp-weather/

  2. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Right, there should be an update including a fix for this issue in a few hours.

    The Alfie Team

  3. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Marking this as resolved.

  4. pkd
    Member
    Posted 1 year ago #

    Thanks for the quick response!

    Got this when i updated the plugin:

    ! ) SCREAM: Error suppression ignored for
    ( ! ) Warning: include(shortcode.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\intranet\wp-content\plugins\alfie-wp-weather\index.php on line 61
    Call Stack
    # Time Memory Function Location
    1 0.0032 970024 {main}( ) ..\plugins.php:0
    2 0.0046 1087400 require_once( 'C:\wamp\www\intranet\wp-admin\admin.php' ) ..\plugins.php:10
    3 0.0051 1113336 require_once( 'C:\wamp\www\intranet\wp-load.php' ) ..\admin.php:30
    4 0.0055 1132408 require_once( 'C:\wamp\www\intranet\wp-config.php' ) ..\wp-load.php:29
    5 0.0067 1263808 require_once( 'C:\wamp\www\intranet\wp-settings.php' ) ..\wp-config.php:91
    6 0.4921 27981296 include_once( 'C:\wamp\www\intranet\wp-content\plugins\alfie-wp-weather\index.php' ) ..\wp-settings.php:195

    ( ! ) SCREAM: Error suppression ignored for
    ( ! ) Warning: include() [function.include]: Failed opening 'shortcode.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\intranet\wp-content\plugins\alfie-wp-weather\index.php on line 61
    Call Stack
    # Time Memory Function Location
    1 0.0032 970024 {main}( ) ..\plugins.php:0
    2 0.0046 1087400 require_once( 'C:\wamp\www\intranet\wp-admin\admin.php' ) ..\plugins.php:10
    3 0.0051 1113336 require_once( 'C:\wamp\www\intranet\wp-load.php' ) ..\admin.php:30
    4 0.0055 1132408 require_once( 'C:\wamp\www\intranet\wp-config.php' ) ..\wp-load.php:29
    5 0.0067 1263808 require_once( 'C:\wamp\www\intranet\wp-settings.php' ) ..\wp-config.php:91
    6 0.4921 27981296 include_once( 'C:\wamp\www\intranet\wp-content\plugins\alfie-wp-weather\index.php' ) ..\wp-settings.php:195

  5. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Please open shortcode.php in a text editor and change line 61 to

    include 'shortcode.php';

    Let us now if the error dissapears.

    The Alfie Team

  6. pkd
    Member
    Posted 1 year ago #

    I don't see a shortcode.php file in your plugin. There is one in the wp core files called shortcodes.php.

  7. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, the file you have to edit is index.php, located inside alfie-wp-weather directory. But, still, there MUST be a shortcode.php file in the same directory.

  8. allcore
    Member
    Posted 1 year ago #

    I just installed your plugin so I have the most current version. I am unfortuanatly having the same 404 error within a sub-directory . . . It is calling the root and not the sub-directory. I have
    include 'shortcode.php';
    on line 61 in my index.php file as well.

  9. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Sorry to hear you encountered problems with the plugin. Could you please post a link to a page where you have the widget active, so we can look into the issue?

    Thanks.

    The Alfie Team

  10. allcore
    Member
    Posted 1 year ago #

  11. pkd
    Member
    Posted 1 year ago #

    My version is being developed for an intranet so i can't give you a link. But i modified the include shortcode.php line 61 in index.php and got same result. It seems you need an actual shortcode.php file in your plugin if you are going to call it.

    I commented out line 61 and the error was removed. However, i'm still not seeing the widget.

  12. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    pkd, please update to the latest version, there was a bug with the latest version and shortcode.php wasn't comitted. Let us know if it solves the issue.

    Regards.
    The Alfie Team

  13. pkd
    Member
    Posted 1 year ago #

    Ok. I did just catch that. Thanks. The error is now gone. However, the widget is not showing when on a subfolder. I'm seeing the same error where the JS is calling getfeed.php in the root.

    I'm running locally, could that have something to do with it? I have not tested this from a live site.

    The intranet i'm running from this machine is also local, but i've created a Virtualhost to rename the site locally. Still have same problem here.

  14. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    We've just released an update for the plugin that fully fixes subdirectory install issues. Please update the plugin to the latest version.

    Hope it finally works for you guys.

    The Alfie Team

  15. allcore
    Member
    Posted 1 year ago #

    It works great! Love your plugin and great support!

  16. pkd
    Member
    Posted 1 year ago #

    It works for me now in a test version. My live intranet version is not working and i'm banging my head trying to figure out. My guess is a Jquery conflict somewhere, possibly with TImely Event Calendar. But i've disabled and deleted all the plugins and it still breaks. Any of this sound familiar?

    Works on my Test version though. Thanks for fixing. I do like the plugin.

  17. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Glad to hear it works now :)

    pkd, is there any error message in console? There's a very small chance for it to be a jQuery conflict because the Alfie WP Weather javascript is wrapped within self-executing anonymous functions to prevent conflicts from happening.

    If you see errors in console or in server logs, paste them here. We'll get to the bottom of the issue :)

    The Alfie Team

  18. pkd
    Member
    Posted 1 year ago #

    I haven't seen any errors in the console. Its puzzling. I'm going to try and reinstall everything from scratch since that worked with my test model. Still I think there is some conflict with Timely, since my test verion Weather works, while events do not. On my live Intranet version the events works, but weather doesn't. I also have an older dev version on a web server and everything functions correctly there. Puzzling...

  19. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    jQuery version?

  20. pkd
    Member
    Posted 1 year ago #

    <script type="text/javascript" src="/wp-includes/js/jquery/jquery.js?ver=1.8.3"></script>

  21. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Really odd. Could you check network in dev tools of Chrome/FF/Safari and see if there's some error showing? Also, can you confirm if getfeed.php has a JSON response with the data from Yahoo API?

  22. pkd
    Member
    Posted 1 year ago #

    I've been watching Network and Consol in Chrome and no errors. Let me check on FF.
    Not sure i no how to check for a JSON response.

  23. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    On Network tab in Chrome, click on getfeed.php, than on Response, you should normally see a JSON object. You also could rightclick on getfeed.php and open that in new tab and see the same JSON response.

  24. pkd
    Member
    Posted 1 year ago #

    Looks like i'm getting a response (for Austin, Tx) :

    {"data":{"woeid":"2357536","title":"Yahoo! Weather - Austin, TX","link":"http:\/\/us.rd.yahoo.com\/dailynews\/rss\/weather\/Austin__TX\/*http:\/\/weather.yahoo.com\/forecast\/USTX0057_f.html","description":"Yahoo! Weather for Austin, TX","language":"en-us","lastBuildDate":"Thu, 25 Apr 2013 1:50 pm CDT","ttl":"60","location":{"city":"Austin","country":"United States"},"units":{"distance":"mi","pressure":"in","speed":"mph","temperature":"F"},"wind":{"chill":"65","direction":"60","speed":"3"},"atmosphere":{"humidity":"42","pressure":"30.28","rising":"2","visibility":"10"},"astronomy":{"sunrise":"6:52 am","sunset":"8:04 pm"},"image":{"title":"Yahoo! Weather","width":"142","height":"18","link":"http:\/\/weather.yahoo.com","url":"http:\/\/l.yimg.com\/a\/i\/brand\/purplelogo\/\/uh\/us\/news-wea.gif"},"item":{"title":"Conditions for Austin, TX at 1:50 pm CDT","lat":"30.27","long":"-97.74","link":"http:\/\/us.rd.yahoo.com\/dailynews\/rss\/weather\/Austin__TX\/*http:\/\/weather.yahoo.com\/forecast\/USTX0057_f.html","pubDate":"Thu, 25 Apr 2013 1:50 pm CDT","condition":{"code":"26","date":"Thu, 25 Apr 2013 1:50 pm CDT","temp":"65","text":"Cloudy"},"description":"\n<img src=\"http:\/\/l.yimg.com\/a\/i\/us\/we\/52\/26.gif\"\/><br \/>\n<b>Current Conditions:<\/b><br \/>\nCloudy, 65 F<BR \/>\n<BR \/><b>Forecast:<\/b><BR \/>\nThu - Mostly Cloudy. High: 72 Low: 60<br \/>\nFri - AM Showers. High: 84 Low: 68<br \/>\n<br \/>\n<a href="http:\/\/us.rd.yahoo.com\/dailynews\/rss\/weather\/Austin__TX\/*http:\/\/weather.yahoo.com\/forecast\/USTX0057_f.html">Full Forecast at Yahoo! Weather<\/a><BR\/><BR\/>\n(provided by </a><a href="http:\/\/www.weather.com">The Weather Channel<\/a>)<br\/>\n","forecast":{"today":{"code":"27","date":"25 Apr 2013","day":"Thursday","high":"72","low":"60","text":"Mostly Cloudy"},"tomorrow":{"code":"39","date":"26 Apr 2013","day":"Friday","high":"84","low":"68","text":"Scattered Thunderstorms"}},"guid":{"isPermaLink":"false","content":"USTX0057_2013_04_26_7_00_CDT"}}}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. --></a>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  25. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm, it looks like there's some error related to a broken WP Super Cache installation. Could you disable it ( or even uninstall it and install W3 Total Cache instead, which is more flexible and reliable ). Make sure you remove any folder related to the plugin, check .htaccess for rewrite rules added by the plugin, check wp-config.php for lines added by the plugin, remove all folders created by it... It could or couldn't be related, but we're eliminating points of failure until we'll get some good news. Also, make sure you clear browser cache.

  26. pkd
    Member
    Posted 1 year ago #

    That was the problem! I had WPSCache disabled, but not deleted. I deleted the plugin and it's cache folder and that worked.

    Thanks for the help!

  27. appcuarium
    Member
    Plugin Author

    Posted 1 year ago #

    Glad to hear you're all set now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic