Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

van2shout messages do not appear

jackmaessenjackmaessen ✭✭✭
edited May 2014 in Vanilla 2.0 - 2.8

I am using 2.1 version, with bootstrap theme and van2shout plugin enabled.
Problem: the shoutbox appears and i can also submit messages, but the messages do not appear in the shoutbox.
I checked already the following:
1. database exist and messages are stored in database
2. permissions members. mods and admin are correct
3. my config.php:

$Configuration['EnabledPlugins']['Van2Shout'] = TRUE;

$Configuration['Plugin']['Van2Shout']['FBUrl'] = '';
$Configuration['Plugin']['Van2Shout']['FBSecret'] = '';
$Configuration['Plugin']['Van2Shout']['ContentAsset'] = '1';
$Configuration['Plugin']['Van2Shout']['Timestamp'] = '';
$Configuration['Plugin']['Van2Shout']['SendText'] = 'Verzenden';
$Configuration['Plugin']['Van2Shout']['TimeColour'] = 'grey';
$Configuration['Plugin']['Van2Shout']['Interval'] = '5000';
$Configuration['Plugin']['Van2Shout']['MsgCount'] = '50';

$Configuration['Plugins']['Van2Shout']['Guest'] = '';
$Configuration['Plugins']['Van2Shout']['Applicant'] = '';
$Configuration['Plugins']['Van2Shout']['Member'] = 'gray';
$Configuration['Plugins']['Van2Shout']['Moderator'] = '';
$Configuration['Plugins']['Van2Shout']['Administrator'] = 'blue';
$Configuration['Plugins']['Van2Shout']['Confirm Email'] = '';

I also tried this url: http://vanilla21.webprofis.nl//index.php?p=/plugin/Van2ShoutData&postcount=50
All the messages do appear!

Someone any idea why the messages are not being displayed?

Tagged:
«1

Comments

  • edited May 2014

    Font color? Look in the source to see if they were printed . I think this plugin has been updated today. Get it form the github source

  • do you have the problem on the default theme as well.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    that's just the problem, when looking in the source, the div is empty

    div id="van2shoutscroll"
    ul id="shoutboxcontent" /ul 
    /div
    
  • jackmaessenjackmaessen ✭✭✭

    yes @peregrine, i switched to default theme but the same problem
    i am using 1.052 version of van2shout

  • try changing to this

    $Configuration['Plugin']['Van2Shout']['ContentAsset'] = '';

    so it shows up in panel.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    @peregrine yes it shows up in the sidepanel, but submitted messages are still do not appear...

  • jackmaessenjackmaessen ✭✭✭

    @vrijvlinder i upgraded class.van2shout.plugin.php, disabled plugin, emptied .ini files in cache folder, enabled plugin but still no result

  • the only thing to prevent it from showing up is if you have js errors.
    did you check your console for errors and if the js loads.

    you might want to change your interval to 5 and see what happens.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • caerostriscaerostris ✭✭
    edited May 2014

    Have you tried the version from github? I think someone merged a fix for 2.1 there!
    https://github.com/Caerostris/Van2Shout

    EDIT: My bad, that fix was uploaded to vf.org about a year ago.
    Do you have PHP error messages enabled? If not, please also check your PHP error log!
    If nothing else works, just try github. I pushed support for smileys about a week ago, so it's cool anyways ;)

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    i checked in the console the javascript errors and he give me the following error on line 15, it says:
    "TypeError: unparsed is undefined"

    $.get(gdn.url('plugin/Van2ShoutData?postcount=50'), function(data)
    {
    var string = "";
    var array = unescape(data).split("\n");
    for(var key in array)
    {
    var unparsed = array[key];
    if(unparsed == "")
    {
    break;
    }
    var colourArray = unparsed.split("[!colour!]");
    unparsed = colourArray[1];
    //render PMs
    if(unparsed.indexOf('[!pmcontent!]') != -1)  // in this line appears the error
    {
    var parsedArray = unparsed.split("[!pmcontent!]");
    var idArray = parsedArray[1].split("[!msgid!]");
    var id = idArray[1].split("[!msgtime!]");
    var time = moment.unix(id[1]).calendar();
    var timetext = '';
    timetext = "<font color='" + timecolour + "'>[" + time + "]</font>"; string = string + "<li>" + DeleteMsg(id[0]) + timetext + " <strong id='post" + id[0] + "'>PM from <a href='" + gdn.url('profile/' + parsedArray[0]) + "' target='blank' >" + parsedArray[0] + "</a>: " + idArray[0] + "</strong></li>";
    }
    else if (unparsed.indexOf('[!pmtocontent!]') != -1)
    {
    
  • try changing that line it to this

    if(unparsed.indexOf("[!pmcontent!]") != -1) // in this line appears the error changed to double quotes .

  • peregrineperegrine MVP
    edited May 2014

    also I would get the entire plugin from github - not just bits and pieces.

    some people have been known to only update one file when many changes are made (it may not be the case for you or this plugin but, its a good idea to replace everything.).

    and then 
    

    to debug....

        around line 33  change   in Van2Shout/views/discussionscontroller_local.php
    
            `//render PMs`
    
        to  
    
            //render PMs
            console.log(unparsed)
    
    and post your information from your console info.
    

    after you post your info - you probably want to comment out the console.log line.

    and change your interval to 5 or 10 instead of 5000 for test purposes.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • you could also empty the shoutbox table and start anew to see if you have a mucked up table.

    where content is not filled in.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • jackmaessenjackmaessen ✭✭✭
    edited May 2014

    i added the line above (console.log) and i now got this error:
    ReferenceError: gdn is not defined
    $.get(gdn.url('plugin/Van2ShoutData?postcount=50'), function(data)

    and i put the line of unparsed.indexOf between double quotes but that doesn't make sense...

  • peregrineperegrine MVP
    edited May 2014

    and i put the line of unparsed.indexOf between double quotes but that doesn't make sense...

    correct not much sense


    you might have better luck if you do all these steps.

    • disable the shoutbox plugin.
    • delete the shoutbox plugin folder.
    • delete the shoutbox table via phpmyadmin

    • remove ALL entries pertaining to shoutbox in config.php (there will be many).

    • download the entire plugin.

    • don't use firebase.

    • and re-copy over all of the js from the vanilla core

    see if you have js errors, if not then

    • use the default theme and re-enable the plugin

    edited

    since you are using 2.1 - you might want to assist with adding plugins that do work

    http://vanillaforums.org/discussion/26703/plugins-and-themes-that-work-and-don-t-work-in-vanilla-2-1/p1

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @jackmaessen said:
    i added the line above (console.log) and i now got this error:
    ReferenceError: gdn is not defined
    $.get(gdn.url('plugin/Van2ShoutData?postcount=50'), function(data)

    and i put the line of unparsed.indexOf between double quotes but that doesn't make sense...

    Sometimes it makes sense if you look at the other ones in that list they have double quotes, that one was the only one with single quotes. Maybe it makes no difference, sometimes it does seem to affect the output.

  • jackmaessenjackmaessen ✭✭✭

    Well i followed all these steps above and finally changed default theme but still no result.
    I used these files for the plugin: https://github.com/Caerostris/Van2Shout

    http://vanilla21.webprofis.nl/images/console.png

    http://vanilla21.webprofis.nl/images/console2.png

    I just don't know what to do...

  • post the contents of your shoutbox table if any.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited May 2014

    @linc I tried to add zip file, a text file, a sql file , etc with the attach feature in the buttonbar.

    what exactly does work, because all the extensions - give me the message "not allowed"

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.