WordPress.org

Forums

YouTube Channel
[resolved] No items [Check here why] (36 posts)

  1. legarsfred
    Member
    Posted 10 months ago #

    My site : http://www.frequenceterre.com (plugin installed at the bottom of left column)
    My channel : https://www.youtube.com/user/FrequenceTerreRadio/
    or
    https://www.youtube.com/channel/UCdGWWwA8we1xQ3GSaF8Pcww

    débug infos :

    server: Apache
    php: 5.4.29
    wp: 3.9.1
    ytc: 2.2.0
    url: http://www.frequenceterre.com/Wordpress
    title: Notre chaîne sur YouTube +
    channel: FrequenceTerreRadio
    vidqty: 1
    playlist: null
    use_res: null
    cache_time: 86400
    only_pl: null
    getrnd: null
    maxrnd: 10
    goto_txt: Visitez notre chaîne Youtube >>
    showgoto: on
    popup_goto: 1
    showtitle: null
    showvidesc: null
    descappend: …
    videsclen: null
    width: 300
    to_show: thumbnail
    autoplay: null
    autoplay_mute: null
    controls: null
    fixnoitem: on
    ratio: 3
    fixyt: null
    hideinfo: on
    hideanno: on
    themelight: null
    debugon: on
    userchan: null
    enhprivacy: null
    dlh_fixed_widget: null

    I've tryed to desactyivate all my homepage plugins.. But nothing works... If you could help ?!

    https://wordpress.org/plugins/youtube-channel/

  2. irunfar
    Member
    Posted 9 months ago #

    I've had the same problem--"No items [Check here why]"--pop up within the past week or so after year(s) of trouble free use.

    server: LiteSpeed
    php: 5.4.27
    wp: 3.9.1
    ytc: 2.2.0
    url: http://www.irunfar.com
    title: An iRunFar Featured Video
    channel: iRunFarMedia
    vidqty: 1
    playlist: PLBAA51FB753E60B39
    only_pl: null
    getrnd: null
    maxrnd: 2
    goto_txt: null
    showgoto: null
    showtitle: null
    showvidesc: null
    descappend: …
    videsclen: null
    width: 344
    height: null
    to_show: iframe
    autoplay: null
    lightbox: null
    controls: on
    fixnoitem: on
    ratio: 3
    fixyt: null
    hideinfo: on
    hideanno: on
    themelight: null
    debugon: on
    use_res: 2
    popup_goto: null
    cache_time: 1800
    userchan: null
    enhprivacy: null
    autoplay_mute: null

    Thanks for any help.

  3. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    @legarsfred and @irunfar In my test environment (just PHP 5.5.12) I'm getting YTC widget nicely.

    Do you maybe use some page/object caching plugin? Can you disable Cache feed in YTC?

  4. irunfar
    Member
    Posted 9 months ago #

    I've disabled YTC caching in both the widget and plugin settings without luck.

    I am using Supercache. I've cleared the cache, but receive the same error. I still receive the same error if I disable Supercache entirely.

    Thanks for looking into this.

  5. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    Check your email. Cheers!

  6. MaTachi
    Member
    Posted 9 months ago #

    I'm experiencing the same problem. I don't have any cache plugins activated on my WordPress blog.

    This is my debug information from the plugin:

    server: Apache
    php: 5.4.8
    wp: 3.9.1
    ytc: 2.2.0
    url: http://misslisibell.se
    title: Mina senaste YouTube-filmer
    channel: MissLisibell
    vidqty: 5
    playlist: null
    use_res: null
    cache_time: 3600
    only_pl: null
    getrnd: null
    maxrnd: 5
    goto_txt: null
    showgoto: null
    popup_goto: null
    showtitle: on
    showvidesc: null
    descappend: …
    videsclen: null
    width: 220
    height: null
    to_show: thumbnail
    autoplay: null
    controls: null
    fixnoitem: null
    ratio: 3
    fixyt: null
    hideinfo: null
    hideanno: null
    themelight: null
    debugon: on
    userchan: null
    enhprivacy: null
    autoplay_mute: null

    However, the thumbnails show up as expected if I change the "Cache feed" setting to "Do not cache". On the other hand, I suspect disabling the caching will affect the page load time and server performance negatively.

  7. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    @MaTachi and @irunfar

    Can you please open youtube-channel.php file from plugin's directory in editor, find string

    'timeout' => 5

    on line 563 and 59, and replace number 2 with 5 or 10, then save changes and try again.

    If after this change you get problem resolved, then we have solution and I'll release new update with additional option for custom timeout for grabbing cached JSON.

    Cheers,
    Urke

  8. MaTachi
    Member
    Posted 9 months ago #

    I set the timeout variable to 10 on both places in youtube-channel.php, but I'm still getting the same error.

    It's a little hard to follow the flow in the code because you have mixed both tabs and spaces for indentation, and WordPress's editor shows tabs as 8 spaces wide.

  9. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    OK, I think that I found problem with one of your videos. This one https://www.youtube.com/watch?v=15v-KtAaI8U have emoji unicode character at the beginnging and at the end of title. That breaks set_transient() and prevent it to save decodec JSON object to database.

    Try with this development version of YTC, or try to change youtube video title and strip emoji emoticons from title.

    https://www.dropbox.com/s/ll7nrsvk6wbcfkk/youtube-channel-dev.zip

    Cheers

  10. MaTachi
    Member
    Posted 9 months ago #

    Is the problem in set_transient or in json_decode? I mean, I would think it's desirable if they can handle all unicode characters properly.

  11. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    set_transient does not work with emoji's.

    I can serialize and then base64_decode JSON before it's saved with set_transient, but I wish to avoid false positive alerts from virus scanners (Wordfence, etc).

    If you have other idea, feel free to suggest solution :)

  12. MaTachi
    Member
    Posted 9 months ago #

    I looked at your patch:

    $json = preg_replace('/🐎/','',$json);

    However, that does obviously only handle the Unicode character 🐎, i.e. U+1F40E. In the Unicode standard there are a lot more emoticons: https://en.wikipedia.org/wiki/Emoji#In_the_Unicode_standard And I guess there would be problems with other Unicode characters as well: https://en.wikipedia.org/wiki/List_of_Unicode_characters

  13. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    Well, then only base64_de/encode can solve this:

    set_transient($cache_key, json_decode($json), $instance['cache_time']);
    replaced with
    set_transient($cache_key, base64_encode($json), $instance['cache_time']);

    and

    $json = json_encode($json);
    replaced with
    $json = base64_decode($json);

  14. MaTachi
    Member
    Posted 9 months ago #

    I looked at my MySQL database and the collation for the varchar columns in wp_options are all set to utf8_general_ci. I wonder if it might work if I were to change the collation to utf8_unicode_ci instead. Apparently does the latter handle Unicode characters better, although a little slower; according to http://stackoverflow.com/questions/1036454/what-are-the-diffrences-between-utf8-general-ci-and-utf8-unicode-ci.

  15. MaTachi
    Member
    Posted 9 months ago #

    I haven't coded any WordPress plugins so I don't know the API. But I'm wondering, why do you currently do set_transient($cache_key, json_decode($json), $instance['cache_time']);? Isn't it possible to store a JSON string as is in the database?

  16. MaTachi
    Member
    Posted 9 months ago #

    I tried the code change that you suggested, with base64 encoding the transient data, and it worked fine. However, it feels a bit like a hack. The downsides are the extra encoding/decoding and 33 % storage overhead. Although, I guess neither is noticable.

  17. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    Isn't it possible to store a JSON string as is in the database?

    Unless JSON contains emoji (or similar unicode) character, yes. Same problem here (solution in last comment).

    When I start with caching implementation, I used json_decoded object to extract elements from items, so I think it's good idea to store object to wp_option instead string. Then added more stuff, and more, and never tidied code.

    Did you tried with collation change in DB? Did that helped?

  18. MaTachi
    Member
    Posted 9 months ago #

    Haven't tried the collation change, I'm affraid I will mess something up, especially on a live website. :P

    But I have a locally installed instance of WordPress, which also has collation set to utf8_general_ci. I added the following three lines of code to the default plugin hellp.php:

    set_transient('kalle', '🐎hej');
    $hej = get_transient('kalle');
    echo $hej;

    And it prints the string 🐎hej correctly on the screen. So apparently there shouldn't be any problems with storing and getting those exotic Unicode characters.

    However, my local web server runs another version of PHP, etc. Dunno if that matters.

  19. MaTachi
    Member
    Posted 9 months ago #

    Umm, played a little more with it. Seems like the string with the Unicode character only shows up after the first page load. When you do additional page reloads it doesn't appear again. However, if I remove 🐎 and only keep hej it works fine on every page load. Dunno what's up with that behaviour. Maybe the first time it never gets it from the actual database.

  20. MaTachi
    Member
    Posted 9 months ago #

    OK, when the value contains the 🐎 character it never gets saved, as seen in:

    mysql> select * from wp_options where option_name like '%kalle%';
    +-----------+------------------+--------------+----------+
    | option_id | option_name      | option_value | autoload |
    +-----------+------------------+--------------+----------+
    |       270 | _transient_kalle |              | yes      |
    +-----------+------------------+--------------+----------+
    1 row in set (0.00 sec)

    But if I remove 🐎 and only keeps the string hej:

    mysql> select * from wp_options where option_name like '%kalle%';
    +-----------+------------------+--------------+----------+
    | option_id | option_name      | option_value | autoload |
    +-----------+------------------+--------------+----------+
    |       270 | _transient_kalle | hej          | yes      |
    +-----------+------------------+--------------+----------+
  21. MaTachi
    Member
    Posted 9 months ago #

    I changed the collation with:

    alter table wp_options convert to character set utf8 collate utf8_unicode_ci;

    To show the collation for all database table columns:

    SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS;

    However, that didn't help. Still isn't possible to store a string containing the emoticon...

    I guess base64 encoding the string is a sufficient workaround. :/

  22. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    Yup, when I look JSON entry in database (output from your YT channel), I found it's saved only until emoji character, then rest of string is cut off - and that returns invalid JSON = No items...

    So we'll go with base64_decode(), latter today :)

    Thank you for help!

  23. Andyt8
    Member
    Posted 9 months ago #

    I have the same problem after upgrade to 2.2.1...

    My site: http://www.blackseals.net (normally you will find it after "Zuletzt bei Youtube")

    edit: so I tried your developer version and it worked again.

  24. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    2.2.1 have option to recache feed on Settings > Youtube Channel > Help tab (at the bottom).

    So, update notices in README.txt seems to does not display to users, so I must to add some other way to inform users how to apply some changes :)

    In general, this will help http://www.blackseals.net/?ytc_force_recache=1

  25. Andyt8
    Member
    Posted 9 months ago #

    Hello, thanks for your fast help. It work again. No, I didn't see Readme.txt, because I used update through WordPress Plugin Update and after a check, I looked to plugin page and WordPress plugin support forum...

    According to your coming new way for informing users...
    -) I was reading changes from the last version. Maybe that is one way to inform for additional upgrade procedures.
    -) Also some plugins show a text line on the upper area in WordPress Dashboard, if there is an additional work after upgrade or after first installation. Maybe also a way to inform users.

  26. urkekg
    Member
    Plugin Author

    Posted 9 months ago #

    Thank you Andyt8 for idea, I added admin notices for updated versions.
    CHeers

  27. mariapessanha
    Member
    Posted 8 months ago #

    Hi,

    No items (check here why) error... cant fix it! can you help me please? here´s the error...

    thanks

    server: Apache
    php: 5.4.30
    wp: 3.9.2
    ytc: 2.2.2
    url: http://viandme.com/wp
    title: Vi & Me @ Youtube
    channel: UCWZBJh05YK2SIM7ltyhIxzw
    vidqty: 1
    playlist: null
    use_res: null
    cache_time: null
    only_pl: null
    getrnd: null
    maxrnd: 25
    goto_txt: null
    showgoto: null
    popup_goto: null
    showtitle: on
    showvidesc: null
    descappend: …
    videsclen: null
    width: 220
    to_show: thumbnail
    autoplay: null
    autoplay_mute: null
    controls: null
    fixnoitem: on
    ratio: 3
    fixyt: null
    hideinfo: null
    hideanno: null
    themelight: on
    debugon: on
    userchan: null
    enhprivacy: null

  28. urkekg
    Member
    Plugin Author

    Posted 8 months ago #

    Hi mariapessanha,

    As I can see, in footer on your website I see YTC thumbnail block, so no more issue on your site.

    Problem was probably with cached ytc feed.

    Cheers

  29. Arkantos
    Member
    Posted 8 months ago #

    Hi, all of a sudden I just got the same error "No items (check here why) error" (sidebar widget.

    First time I have a problem with your plugin.

    server: Apache
    php: 5.4.4-14+deb7u7
    wp: 3.9.2
    ytc: 2.2.2
    url: http://mysteryplanet.com.ar/site
    title: MysteryPlanet Channel
    channel: mysteryplanet
    vidqty: 1
    playlist: null
    use_res: null
    cache_time: 3600
    only_pl: null
    getrnd: on
    maxrnd: 3
    goto_txt: Más...
    showgoto: on
    popup_goto: 2
    showtitle: on
    showvidesc: null
    descappend: …
    videsclen: null
    width: 220
    to_show: thumbnail
    autoplay: null
    autoplay_mute: null
    controls: null
    fixnoitem: null
    ratio: 3
    fixyt: on
    hideinfo: null
    hideanno: null
    themelight: null
    debugon: on
    userchan: null
    enhprivacy: null
  30. urkekg
    Member
    Plugin Author

    Posted 8 months ago #

    Please try to disable option 'fix no items' in widget.

Reply »

You must log in to post.

About this Plugin

About this Topic