Weird output by printLatestComments with multilingual and seo-locale

I have multilingual (en_US, ro_RO) and seo-locale activated for zenphoto 1.3 and a custom zenpage theme. I'm using the following function in the sidebar:

<?php printLatestComments( 4, '100', 'all', '' ) ?>

It prints:

a:2:{s:5:"en_US";s:15:"Airbrush videos";s:5:"ro_RO";s:19:"Videouri aerografie";}: Portiere de Oltcit tunat pictate la aerograf by Andrei
u crazy dude :D nice work

I was expecting:

Airbrush videos: Portiere de Oltcit tunat pictate la aerograf by Andrei
u crazy dude :D nice work

Anny ideas why? If not I'm going to alter the function in template-functions.php in order to remove the parent folder from output.

P.S:

<?php printLatestZenpageComments( 4, '100', 'showlatestcomments', 'all', '' ) ?>

This function seems to work just fine right after the first one.

Thanks!

Comments

  • Acrylian will have to investigte this. But what you are seeing is an un-processed multi-linugal string. I am not at home now, but I did not think that user comments were "multi-liingual".
  • acrylian Administrator, Developer
    Comments of course are not multilingual (no one comments in several languages, right..;-)). I will take a look.
  • Of course :P No need for multilingual comments. I'll be waiting an answer. If it can't be fixed I'll simply remove the parent folder from the function output, no harm done.

    Thanks for help!
  • acrylian Administrator, Developer
    Found it, an oversite as album titles are of course needed multilingual as are image titles (just the comment itself not). This function is much older than multilingual support.

    To fix it yourself look at template-functions.php line 3185:
    `$albumtitle = $comment['albumtitle'];`
    and change it to
    `$albumtitle = get_language_string($comment['albumtitle']);`

    The part for the image title was already correct. Anyway, fix will be in tonight's nightly.
  • Problem fixed :D
    Thanks again!
  • The issue has recurred. I have activated Combinews in order to have control over news article text sample in the rss feed.

    Code:

    `<?php printLatestNews( 1,'none', '', false, true, 185, false); ?>`

    Output:

    *
    Prototip Renault DeZir

    Producatorul de masini Renault a dezvaluit de curand unul din urmatoarele sale concepte, denumit DeZir. Litera Z din denumire ar trebui sa faca aluzie la faptul ca avem de-a face cu (...)a:2:{s:5:"en_US";s:9:"Read more";s:5:"ro_RO";s:18:"Deschide articolul";}

    Thanks for help!
  • acrylian Administrator, Developer
    Please look into the source of that articles content (without tinymce). Maybe somehow the serialized multilingual stuff has been mixed up with the content. I have no idea why this should happen. Nothing has been changed on that since a long time (I think),
  • Can't be from the article html code. I checked it and it is clean. All articles exhibit this problem. Maybe it's a fix similar to the first one. I have tried to search for the problem in zenpage-template-functions.php but without results. Maybe you can spot anything wrong.
  • acrylian Administrator, Developer
    I did take a look and printlatestnews uses the class method to get the content and that already should get the right version. I will try to reproduce it though.
  • I'm sorry but I can't tell what exactly caused the bug. I know for sure that a day before the link was just fine and after a did a few settings in the admin panel I noticed the weird letters. I have a backup copy which I can install on my localhost to try to figure out what I did in order to produce the bug. I'll be posting if I learn something new.
  • acrylian Administrator, Developer
    Ok, thanks. I will try to reproduce it later today as well.
  • acrylian Administrator, Developer
    I am sorry I was not able to reproduce this with the current svn.
  • acrylian Administrator, Developer
    Well, I have to admit you were right. It was caused by a read more link not being setup for multilingual. Thanks goes to sbillard who spotted that actually.

    So please try tonight's nightly.
  • Meanwhile I found a cure for the messed up string. I changed it directly in phpmyadmin.

    Here's the faulty line:

    `(270, 0, 'zenpage_read_more', 'a:2:{s:5:"en_US";s:9:"Read more";s:5:"ro_RO";s:18:"Deschide articolul";}', NULL),`

    How I changed it:

    `(270, 0, 'zenpage_read_more', 'Deschide articolul', NULL),`

    I guess I can live with the current code untill the next stable release if the messy code can be triggered only by admin actions.

    Btw, talking about next release: It would be nice to have a selector for the statistics page like:

    - all time
    - august
    - june
    ... an so on

    Thanks for the help with this bug.

    Edit:

    I'm still confused. Can you tell me what is actually triggering the behavior?
  • acrylian Administrator, Developer
    Well, the issue you encountered was that the "read more" link did not sort out the languages it needed (that set for your site at the moment) so it returned the whole serialized string. This is now fixed.

    Regarding the gallery statistics. So you want a kind of most viewed etc. images for a specific month? I think that won't be possible as Zenphoto does not store such info in relation to those infos at all. There are other tools for these kind of info, my host for example provides such things (Webalizer etc.) and also the infamouse Google stats do this kind of detailed info.
    (Generally, for such wishes the best is to open a ticket.)
  • OK, I see. I do have cpanel and analytincs and a few more programs whatching my site, but none does offer a clear picture at a glance about images, pages and articles. It ain't a big issue and I can deal with it. Sry for offtopic :D
  • acrylian Administrator, Developer
    No problem with off topic. The hint to the tickets was just because such ideas might get lost on the forum.
Sign In or Register to comment.