Please upgrade here. These earlier versions are no longer being updated and have security issues.

[Solved] Probably an issue with css !

This discussion is related to the Fruit addon.
13»

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @peregrine: I've posted the source of the profile views div class="Tabs ProfileTabs" here: http://vanillaforums.org/discussion/comment/196920/#Comment_196920

    Whenever there is a count after Discussions or Comments tab, there seems to happen something recursive, because text is inserted more than one time and I would assume that it happens after page load by javascript, because side is built up normally and when it is nearly finished, those elements in the screenshots above were ordered in that messy way and it looks indeed as if they are falling down.

    @pracddha: I've seen that you are using the minifier plugin and I've read some complaints about it already. Try to disable it, please.


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I've looked at the other side you've mentioned: http://www.civilengg.in/profile/3/rohit. You don't have minify there, so it is not that plugin.
    But it is a Javascript issue. If you look at that side with javasctipt disabled, then you don't have that falling down. You'll end up with that HTML:

       < ul>
       < li class="Active Activity">< a href="/profile/activity/3/rohit" class="TabLink">Activity< /a>< /li>
    < li class="Discussions">< a href="/profile/discussions/3/rohit" class="TabLink">Discussions < span class="Count">1< /span>< /a>< /li>
    < li class="Comments">< a href="/profile/comments/3/rohit" class="TabLink">Comments< span class="Popin TinyProgress" rel="/profile/count/comments?userid=3">< /span>< /a>< /li>
       < /ul>
    

    I'm out now. I have only very basic knowledge about JavaScript, sorry...


    UnderDog
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Btw: that is the html that's generated when you visit that side with js enabled:

    <br />   < ul>
       < li class="Active Activity">< a href="/profile/activity/3/rohit" class="TabLink">Activity< /a>< /li>
    < li class="Discussions">< a href="/profile/discussions/3/rohit" class="TabLink">Discussions < span class="Count">1< /span>< /a>< /li>
    < li class="Comments">< a href="/profile/comments/3/rohit" class="TabLink">Comments< span class="Popin" rel="/profile/count/comments?userid=3">< div class="Empty">Not much happening here, yet.< /div>
       < /span>< /a>< /li>
       < /ul>
    

    Before js there is a class "TinyProgress" and after js it is replaced with rubbish. So I'd advice you to search in your files for "TinyProgress" and see what files handle with that class...


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Pffff...

    When user is created, CountDiscussions and CountComments in User table are NULL. If you open up the profile of a new user, you'll see a "blank count notification" behind Discussions and Comments (inserted by function CountString in functions.render.php)
    After the first visit, NULL is replaced with '0' and at the next visit, you do not see that blank notification any more.

    Those blank notifications destroy your design.

    @pracddha : open phpMyAdmin, go to user table and edit default value of CountDiscussions and CountComments from NULL to 0

    Afterwards just visit the profiles that look ugly and click on either the comments or discussions tab. That should solve your problem.


    hgtonightUnderDogpracddha
  • pracddhapracddha New
    edited November 2013

    Thank you so much @R_J. You're an absolute genius. How deep you dug and brought out the problem that lied inside. And that worked absolutely fine. Thank you for making time to look into my problem thoroughly and coming up with solution, every time (not just this time but previously as well). Really grateful :)

    @R_J, @hgtonight, @peregrine: This strangeness and mysteries of vanilla surprising me everday. And everyday comes with a new riddle. Here is what happened today. R_J brilliantly solved my issue of that css fall down, however I decided to stay with default theme coz now I am getting some feel of how to customize themes in vanilla. So, I created my own theme copying default vanilla theme. I named it mytheme and placed in themes folder in server. Then I edited css, and changed head background with #333333. And uploaded to the server. I loaded the site and could see the changes. I was experimenting with head background. So, I changed that #333333 to a [image url] and uploaded the css file again. But now, homepage shows same #333333 and discussion post shows [image url] as head background. I thought it could be cache problem. I cleared all cache. Same result. I checked with proxy site hidemyass, same result. That is again strange.

  • pracddhapracddha New
    edited November 2013

    For now solved my problem with temporary solution i.e. changed the theme name from "mytheme" to "mtheme" and applied whatever head background I wanted to, and now every page whether homepage or discussion post is displaying same. However, the mystery of what actually happened is still unsolved. Please check the issue above mentioned in comment no: [197024].

  • It was probably a cache issue or are you using cloudflare or some other means of caching.

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

    UnderDog
  • pracddhapracddha New
    edited November 2013

    @peregrine: I am not using cloudflare or any cdn services. That's why I checked with clearing browser cache. Also, I checked it with "hidemyass" proxy site. Even they displayed same bizarre result. So, it wasn't clearly a cache problem. A thing to look into in the future. What could have actually happened?? I think @R_J can come up with answers. He can really dig things deep into and reach to the core of the problem.

    Or could it be vanilla's own cache system. Does vanilla has any such thing or cache system. Also, I encountered with term "leverage browser caching" while doing speed test for my site. Is that applied to vanilla, if yes, was it resulting that bizarre effects ?

  • peregrineperegrine MVP
    edited November 2013

    well r_j provided you with a good work around your edge case. Some thing with Null vs. 0 but that is still a workaround. Something in your code, is not working right. Otherwise the other 690,369+ people who downloaded the core would have had the same problems.

    Better to address the issue, then alter properties of core database table columns.

    Some day some one may use isNULL in a plugin and theme and your site will fail because you have all 0's. (the odds are slim, but the underlying cause of problem is in your code and the interpretation of a NULL.)

    AS R_J said: Those blank notifications destroy your design.

    but not anyone else's,

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

    UnderDog
  • pracddhapracddha New
    edited November 2013

    @peregrine: As far as my opinion is concerned, it's actually the problem of vanilla core. (I can be wrong though!) The reason is I tested on both sites. One on domainhostforum.com and later on civilengg.in. On later one I hadn't done anything other than installing fresh copy of vanilla (I had made some edit on former one; default.master.php), used default theme and added some plugins. While testing, I disabled the plugins as well. So, here test was purely done on vanilla core.

    Like in the case study R_J mentioned, the problem only occured, on profile page ("only on profile page") of those who had just/newly registered (yet to visit the site or make an activity) and only existed for only some time being (after null status changes to 0) even if not active on the site. I created a new account, then checked its profile after about 8-9 hrs and problem was gone. So, it could be that, people never realized this or It could be that their theme didn't had any problem with it. Because "soothe theme" was working fine even with this problem.

  • peregrineperegrine MVP
    edited November 2013

    So, here test was purely done on vanilla core.

    default theme too, then it may be a core issue, but no one else experienced it. If it is theme specific - it is theme specific problem not core.

    in any event you file on github, with respect to NULL vs. 0 - if it is indeed an issue with 2.1b2 as well.

    But you are using 2.0.18.8 - so the likelihood of a change being made there is slim.

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

    UnderDog
  • pracddhapracddha New
    edited November 2013

    Yes, probably you can download the fresh copy of vanilla 2.0.18.8 and test at your end. On the fresh site, register as new user and leave the status as "confirm email" and on next browser (or you can turn on private browsing) and immediately go to activity and through that activity page visit the profile page of newly registered user.

  • @pracddha said:
    Yes, probably you can download the fresh copy of vanilla 2.0.18.8 and test at your end. On the fresh site, register as new user and leave the status as "confirm email" and on next browser (or you can turn on private browsing) and immediately go to activity and through that activity page visit the profile page of newly registered user.

    Good! If it's reproducable in 2.1b2 then make a bug report and post the bug number in this thread please

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Tested it with 2.0.18.8 and 2.1b2
    There is a blank notification in 2.0.18.8 which is a bug but who cares any longer, since it is no bug in 2.1b2

    Nevertheless it would be worth to find out why this two installations behave different, but I think you would have to have access to his filesystem in order to find the reason for that behaviour. I'd simply try a fresh install, but that error appeared already on two different installations, but they might base on one currupt source file. Who knows...


  • peregrineperegrine MVP
    edited November 2013

    It looks to me the problem is here.

    in class.hooks.php

    original:

    <br />    $Sender->AddProfileTab('Discussions', 'profile/discussions/'.$Sender->User->UserID.'/'.rawurlencode($Sender->User->Name), 'Discussions', T('Discussions').CountString(GetValueR('User.CountDiscussions', $Sender, NULL), "/profile/count/discussions?userid=$UserID"));
             $Sender->AddProfileTab('Comments', 'profile/comments/'.$Sender->User->UserID.'/'.rawurlencode($Sender->User->Name), 'Comments', T('Comments').CountString(GetValueR('User.CountComments', $Sender, NULL), "/profile/count/comments?userid=$UserID"));
    
    

    changed NULL to 0:

    <br />    $Sender->AddProfileTab('Discussions', 'profile/discussions/'.$Sender->User->UserID.'/'.rawurlencode($Sender->User->Name), 'Discussions', T('Discussions').CountString(GetValueR('User.CountDiscussions', $Sender, 0), "/profile/count/discussions?userid=$UserID"));
             $Sender->AddProfileTab('Comments', 'profile/comments/'.$Sender->User->UserID.'/'.rawurlencode($Sender->User->Name), 'Comments', T('Comments').CountString(GetValueR('User.CountComments', $Sender, 0), "/profile/count/comments?userid=$UserID"));
    
    seems to solve it.
    
    

    In vanilla 2.1 - the code is basically the same - so the problem "possibly" exists, if not corrected elsewhere.

    <br />            $DiscussionsLabel .= '<span class="Aside">'.CountString(GetValueR('User.CountDiscussions', $Sender, NULL), "/profile/count/discussions?userid=$UserID").'</span>';
                $CommentsLabel .= '<span class="Aside">'.CountString(GetValueR('User.CountComments', $Sender, NULL), "/profile/count/comments?userid=$UserID").'</span>';
    
    

    but you can turn off the counts display via

    $Configuration['Vanilla']['Profile']['ShowCounts'] = FALSE;

    It actually looks like they fixed it up in another location in 2.1 because there is no empty span that I see.

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

    UnderDogphreak
  • phreakphreak VanillaAPP - White label iOS and Android App MVP

    God am i lucky it is not related to the Fruit theme. ;)

    UnderDog
  • All that appears on fruit theme when it is null is empty spans. (left image)

    but it doesn't cause the behavior of the comments dropping down the screen when it is null.

    I think that was the op's problem.

    and since the look below is only transitory, after a reload of the page it disappears (right image), it seems for most users of vanilla that would only minor issue (that is not a result of the theme).

    and it looks like it isn;t an issue at all in vanilla 2.1 as far as the empty span.

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

    UnderDog
  • pracddhapracddha New
    edited November 2013

    @R_J, @hgtonight, @peregrine : so, you guys are already into 2.1. Why not? You guys are pro vanilla users. However, I am going to stay with stable version of vanilla 2.0.18.8. That's what recommended by Lincoln as well, for new users. For now, my issue is solved. And I am not going to use any more plugins. So, I hope it will work fine for me. I will probably think of upgrading, once stable version of 2.1 is released.

    I would like to offer @R_J "Pro 1D" hosting free for a year for any of the blog he want to host with my newly started small web hosting company > Nepal Domain Hosting Pvt. Ltd. [For providing the support heartily (that shows in the way he come up with solution)]. Thanks everyone for the help that you had offered till date. If you guys ever come to Nepal, I will treat you with MOMO & Coffee(that's what peregrine always asks for in donation). This is for u as well @Phreak (even though u always acted lazy :p and refrained from things most of the times)

    Good bye for now !

    phreak
  • @R_J : Yeah correctly said. That's poor html. But author will have to fix that.> @R_J said:

    By the way: when I click on that link on your page, I get a new browser window, and no inline popup

    Hmm?? That's amazing. Did you click on that fb icon or in "sign in" button. If you click on that "sign in" button, you will get pop-up. If you click on that fb icon, you will get a new browser window.

    I am attaching a image file here with three screenshots of my problem.
    1) Screenshot at left: [http://www.domainhostforum.com/profile/1/admin] Amazingly it's normal here.
    2) Screenshot at right: [http://www.domainhostforum.com/profile/3/getfishone] It has that problem. Sub-menu falling down. As the page finish loading down, it falls down like this.
    3) Screeshot at buttom: [http://www.domainhostforum.com/profile/2/ununtydust] It has similar problem as mentioned in 2).

13»
This discussion has been closed.