WordPress.org

Forums

WP Cloudy
[resolved] php + encoding errors continues (27 posts)

  1. kryvulena
    Member
    Posted 1 year ago #

    Hi

    I just updated the plugin to v2.7.5 and I get this error quite often:

    Fatal error: Call to a member function asXML() on a non-object in /wp-content/plugins/wp-cloudy/wpcloudy.php on line 2039

    Fatal error: Call to a member function asXML() on a non-object in /wp-content/plugins/wp-cloudy/wpcloudy.php on line 2016

    or

    Fatal error: Call to a member function asXML() on a non-object in /wp-content/plugins/wp-cloudy/wpcloudy.php on line 1994

    Any page displaying the plugin still loads slower than any page w/o it and it loads noticeably slower than it used to be before...

    There is a problem with non-English characters encoding, they are all replaced with � sign. Additionally there are still some words remaining in English, although I choose another language from the lang. list.

    https://wordpress.org/plugins/wp-cloudy/

  2. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Hi!

    Please upgrade to the latest version of WPCloudy (2.7.7) to fix this issue.

    Let me know if there is any trouble!

    For translation please read this => http://www.wpcloudy.com/support/guides/translate-wp-cloudy-language/

    If you have trouble with characters encoding, it's related to your webhost that does not support your language.

  3. kryvulena
    Member
    Posted 1 year ago #

    My webhost supports my language on 100% - I called them and read their spec. Moreover I've never experienced any issues like that with any other plugins (managing 40+ WP sites here...). The issue is not retalet to the .po file - the errors come within words that are taken automatically by the plugin from somewhere else. There are no day names in the .po file to be translated.

  4. kryvulena
    Member
    Posted 1 year ago #

    Btw thanks for the update, I will test it today and will try to provide a feedback if any issues encountered again. Happy to contribute to make the plugin better!

  5. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for your support!

    FYI, I use 2 PHP functions to display days:
    - setlocale =
    http://fr.php.net/manual/fr/function.setlocale.php

    and strftime =
    http://fr.php.net/manual/fr/function.strftime.php

    Unfortunately, it is difficult to test this stuff without having servers spread across several countries.

    Nevertheless, I will continue to investigate that :)

  6. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Can you give the desired language please?

  7. kryvulena
    Member
    Posted 1 year ago #

    Most of my WP sites I manage are Polish based. I tested php locale at my server and it's fully supported for Polish. Maybe the case is encoding-related. But it's a virtual host so I cannot access any php settings there.

  8. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Can you try editing this line in wpcloudy.php (2001):

    $wpcloudy_lang_host = 'polish';

    by putting this:

    $wpcloudy_lang_host = 'pl_PL';

    Let me know if it's better!

  9. kryvulena
    Member
    Posted 1 year ago #

    I found that at line #1957 - not #2001

    changed to $wpcloudy_lang_host = 'pl_PL';

    No change, unfortunately

  10. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Can you give me a link to your site?

  11. kryvulena
    Member
    Posted 1 year ago #

    May I have your email address to send the url to please, I'd like to keep the site private until it's done.

  12. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    There it is: contact@wpcloudy.com

  13. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Can you replace line 2154 (//Forecast loop) by this please:

    $forecast_day_[$i] = utf8_encode(strftime("%A", strtotime($myweather_sevendays->forecast[0]->time[$i]['day'])));

  14. kryvulena
    Member
    Posted 1 year ago #

    It didn't help. I get "Poniedzia³Ek" instead "Poniedziałek"

  15. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    I do not have the exact line because I use a dev version.
    But, when you see this code, replaced it with this one:

    $i=1;
    			//Forecast loop
    			while ($i<=13) {
    				$forecast_day_[$i]			= utf8_encode(strftime("%A", strtotime($myweather_sevendays->forecast[0]->time[$i]['day'])));
    				$forecast_number_[$i]		= $myweather_sevendays->forecast[0]->time[$i]->symbol[0]['number'];
    				$forecast_temp_min_[$i]		= (round($myweather_sevendays->forecast[0]->time[$i]->temperature[0]['min']));
    				$forecast_temp_max_[$i]		= (round($myweather_sevendays->forecast[0]->time[$i]->temperature[0]['max']));
    				$i++;
    			}
  16. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    OK! I continue to investigate!

  17. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Is this correct => http://www.wpcloudy.com/test/

  18. kryvulena
    Member
    Posted 1 year ago #

    hi, yes this one displays characters OK

  19. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    WPCloudy 2.7.8 is out! It shoud fixed your problem!

  20. kryvulena
    Member
    Posted 1 year ago #

    IT WORKS! you're awesome, thank you!

  21. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Great!

  22. kryvulena
    Member
    Posted 1 year ago #

    Guys, I just noticed the same character encoding issue still exist at the short desc info - sample: http://prntscr.com/3ih51g
    However the 14-forecast display characters ok.

    Sunrise/Sunset times are still wrong (some servers use UTC instead of local time...)

  23. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Just fixed it!
    For sunrise/sunset still in progress :)

  24. kryvulena
    Member
    Posted 1 year ago #

    Fantastic, thanks a lot!

  25. kryvulena
    Member
    Posted 1 year ago #

    I updated to v2.7.8.1 but it didn't fix the issue, unfortunately

  26. rainbowgeek
    Member
    Plugin Author

    Posted 1 year ago #

    Oups, testing too fast, NOW it's OK :D

  27. kryvulena
    Member
    Posted 1 year ago #

    HOORAY! it works! Thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Cloudy
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.