Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: HTML Comments displayed in reported post username

  1. #1
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default HTML Comments displayed in reported post username

    This minor bug occurs when a post by a user with a translated username is reported to a moderator and posted to a thread. The HTML comments are shown because they are converted to HTML-safe characters prior to the global hook being run.

    Before-


    After-


    Fix-
    In functions_vbenterprisetranslator_hooks.php find:
    PHP Code:
    if (strpos($output,'<!--vBET_ENTA-->')) {
    $output =& str_replace(array('<!--vBET_SNTA--><!--vBET_NRE-->',
    '<!--vBET_ENTA-->'), ''$output); 
    Replace with:
    PHP Code:
    if (strpos($output,'<!--vBET_ENTA-->') || strpos($output,'&lt;!--vBET_ENTA--&gt;')) {
    $output =& str_replace(array('<!--vBET_SNTA--><!--vBET_NRE-->',
    '<!--vBET_ENTA-->','&lt;!--vBET_SNTA--&gt;','&lt;!--vBET_ENTA--&gt;'), ''$output); 
    There's probably a smarter fix that would allow these comments to be used i.e. in 'code' bbcode, but that's not a concern in my case.

  2. #2
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    Ok. So I need to reproduce this bug on my forum test. How can I do that? May be this is a conflict with another mods? Can you check it (find a conflict).
    I will try to confirm it. I will show this solution to Michał.
    Thanks
    Last edited by kamilkurczak; 09-08-10 at 09:43.

  3. #3
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    If you make a post in a language different from the forum's default, then usernames are stored with snta and enta tags around them in the database. Simply report such a post, and in the auto-generated thread, the linked username will include the comments.

  4. #4
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    I can't reproduce this issue on my test forum.

    of course I need to know - may be conflict. I should describe how to find conflict in previous post, so I describe it now.

    please, Turn off all other mods one by one (vBET must be enabled) and try to find this issue again. If one of this mods is disabled and you can't fint this issue - we have a conflict with this mod.

    So, please try to find this conflict

  5. #5
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    I can't do that on my forum right now, as it's a live site, not a test site.

    Here's the information I can provide you with:
    1. The SNTA and ENTA comments are saved within the 'postusername' field in the 'post' table in the database.
    2. When the report is made, vBulletin fetches the username from that field, and thus, the comments are shown.

    If you can't find the bug, no worries- it might be specific to my site, even though I doubt that.

  6. #6
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    There is no column 'postusername' in 'post' table. I suppose this column was added by some mod - in this case this should be concern as some integration issue. But we do not know with which mod.

    Post table do have column 'username' - but there no value with NTA tags. I checked it in our database by this query:
    Code:
    SELECT * FROM post where username like '%SNTA%'
    And in our forum there is lot of messages written in different languages.

    Can you determine which of your mods added 'postusername' column to your 'post' table. That would be helpful to find out what is going on there. At this moment I move this thread to troubleshooting section, and we will move it to integration section when we will know with which mod we integrate here.

  7. #7
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    I think I meant username. I'll provide you with a screenshot shortly.

  8. #8
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    It was indeed the username field.

    See here for an example:

    Interestingly, not all translated posts contain ENTA and SNTA tags around the username.



    BTW- you should increase resolution restrictions on attached images.

  9. #9
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    ok, this is a 'username'. now it is correct.
    Code:
    If you can't find the bug, no worries- it might be specific to my site, even though I doubt that.
    ok, but we would like to make a Integration Guide with a mod, which causes this bug. (if this is an issue caused by the conflict).

    secondly - we would like to confirm your solution for our members.

  10. #10
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Are you sure this is caused by a conflict, and just doesn't happen under specific circumstances? Unfortunately, I can't really do any further tests at my end. Only 8 posts in my entire database have usernames with NTA comments wrapped around them. Also, note that the translation system is used extensively on my site- the cache database can grow to 10Gb+. This must therefore mean one two things: either the bug existed in the past and is now fixed, or that the bug occurs very rarely.

    Have you checked your post table on the database on this site?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •