I'm getting NaN characters remaining when I'm using panels. It doesn't look like it's a browser problem but I'm using Firefox 3.5.5 and IE8.
I've already read the couple other issues about getting NaN characters remaining, but I don't have more than one status box per page. Maybe it is related though since the characters remaining seems to work perfectly fine except on the main user page which uses panels. If I disable the panels module, it'll work as normal.
Another thing is that if I show the block it'll say "140 characters allowed" and if you click in the box it should change to "140 characters remaining" but it doesn't even get to that state. It just stays as 140 characters allowed whereas if I add the block through panels when I start typing it'll change to "NaN characters remaining."
I've already tried the dev version which produced the same problem. I also tried turning on and off the legacy mode user profile. Any ideas what could be wrong? Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | profile_panels_variant_no_fbss.txt | 7.03 KB | Canine Coaches |
| #14 | profile_panels_variant_with_fbss.txt | 7.55 KB | Canine Coaches |
| #14 | fbss_dev_panels_showing.txt | 6.1 KB | Canine Coaches |
| #14 | fbss_dev_panels_not_showing.txt | 5.87 KB | Canine Coaches |
| #14 | fbss_dev_panels_showing_anonymous.txt | 5.69 KB | Canine Coaches |
Comments
Comment #1
icecreamyou commentedYes, the character counter works with Panels, as you can see on the demo site.
I assume you've read http://drupal.org/node/551698#nan ...
The very latest development build removed support for the AJAX module, which seemed to be interfering with when FBSS' JavaScript was loading. Try upgrading to that.
Search your source for
id="edit-fbss-status. If you find something likeid="edit-fbss-status-0"then there is more than one status update box being calculated on the page.Also try turning off JS aggregation and then searching your source (with CTRL-U or View>>Source, not in Firebug or similar) for
facebook_status.js. If you can't find it, it means the JS is being added dynamically by e.g. the Quicktabs module, which theoretically shouldn't work (although for some reason it works for me when I test it).You might get some insight into this by testing whether you get different results after you've already submitted the form (via AHAH) or if you turn AHAH processing off in the module's settings.
Comment #2
Platinum commentedYea, I read that guide. Hmm, I tried the dev version earlier and there seemed to be no difference. I swapped back afterwards. I also just now tried viewing the source and there is only one "edit-fbss-status" id with no "edit-fbss-status-0". JS aggregation is also disabled and currently not using quicktabs module. Whether I have AHAH on or off also doesn't seem to make a difference. For panels, are you also using version 6.x-3.2?
Comment #3
icecreamyou commentedYes, I'm using Panels 6.x-3.2.
Do you have the AJAX module installed? Did you find facebook_status.js in your source? What happened when you tested after submitting the form at least once? What about after submitting the form after turning off AHAH?
Comment #4
Platinum commentedI don't have the ajax module installed. Do you mean this one: http://drupal.org/project/ajax
Is it required or did you ask because it might be something that could cause conflicts?
I see the facebook_status.js in the source. There doesn't seem to be a difference when using AHAH or not. If there is no status it will display the characters allowed and as soon as you type it'll turn to NaN. After you submit a message, it'll stay display your new status with "NaN characters remaining". Same thing happens whether it is on or off.
Comment #5
icecreamyou commentedThe AJAX module is not required, in fact I recommend that you don't have it installed as it has caused conflicts in the past (although it shouldn't in the dev version).
What are you using to display the status update form in the panel? Are you using the block or the CTools stream content type under the User category? Are you using a custom theme, any custom JavaScript, any customization of the FBSS form, or the JQuery Update module?
Is this a new FBSS installation or an upgrade? Either way, try clearing your Drupal caches (run update.php) to see if it helps. (You should also be using this process when you upgrade.)
Exporting your variant and attaching it here would also help me identify anything immediately obvious.
Comment #6
Platinum commentedI have tried both the regular block and the stream content under user, but both had the same problem.
Using garland theme, just a little bit of custom slide toggle JS (although I took it off just to test and no difference), no customization of the FBSS form, and not using jquery update. This is a new installation. Well I'm not sure if it's considered a new installation. I first installed the stable version and when this feature wasn't working I uninstalled it and tried the dev version. There was no difference in the dev version so I went back to the stable version.
I also just now tried deleting all the contents for the panel except the facebook status, thought it might work, but doesn't.
Not sure if that is what you wanted but I pasted the export of the variant from panels below.
Comment #7
icecreamyou commentedAre you using the Advanced Profile module? What are the permissions of the user you're using to test? Someone a few weeks ago mentioned that the character counter didn't work with Advanced Profile and User 1...
Comment #8
Platinum commentedYep, using Advanced Profile Kit. I tried on multiple users, not just user 1, and it still happens for all users. For authenticated users, they have all permissions except edit all statuses for this module. Tried playing around with the permissions just now, but no difference once again.
If I disable the advanced profile module it still doesn't work though, it only works when I disable panels. Does it have anything to do with the original status box? Maybe some part of it is still being included. By that I mean if you have panels disabled there will be the status box on your profile by default, but if you enable panels, the status box is gone until you add it yourself to panels manually.
Comment #9
icecreamyou commentedThat's a possibility... does the status update form work in a panel somewhere other than user profiles?
Comment #10
Platinum commentedHmm, it works when placing the facebook block (since there is no user) on a random panel so it seems to only be a problem with the user_view? Another thing I just noticed is that while the character count doesn't work on the user profile, it actually works when previewing the panel variant of the user profile... What could that mean?
Comment #11
icecreamyou commentedI'm not quite sure, TBH. Probably it means something is loading that shouldn't be and it's confusing the JavaScript. I don't have time to configure a fresh test suite where I could try to reproduce and debug this right now, but at least I know what to look for (likely a Panels bug I think) and I'll try to investigate when my schedule clears up in 2 weeks or so. In the mean time, I'll try to contact someone else who may have had this problem and see if she can figure something out; and if you know any PHP or JavaScript you could try inserting
drupal_set_message()s into the FBSS form to see how many you get on page loads.Comment #12
michelleI can give the debugging in #11 a try in a couple of days.
Michelle
Comment #13
Platinum commentedI'm in no particular rush so you can take your time if you're busy. Thanks for looking into it.
Comment #14
Canine Coaches commentedI am having the same problem. I have not got this to work with panels. I am using d6.15, panels 6.3.3, and I have tried it with the 6.2 release of fbss as well as the dev. version currently installed. I have tried without apk and now with apk and same results. I have one issue not mentioned above: the default text does not "dissapear" when you click in the box. I have been testing this since I last posted on the heartbeat integration issue hours ago (which I have not got working either). I have tested in google chrome, IE8 and I didn't test firefox as I saw platinum had done that and I don't think it's a browser issue. I am also using garland with no mods, quite a few modules, but not a whole lot enabled yet (too many to mention here). I believe this is a panels/ctools issue IMHO.
It works with block in the sidebar, until you go to user profile, then same results as when it is in the panel.
I have tried with user 1 and auth user with same results. I have set numerous permissions and cannot see this as anonymous user. Scince I cannot see it as anon. I attached source viewed as anon. to see if the form is "still there in the code" Sorry I am not good with php or I would help more.
Here are some source codes and variats from my site:
profile_panels_variant_no_fbss: an export of my panels variant without the fbss form "enabled" apk off
profile_panels_variant_with_fbss: an export of my panels variant with the fbss form "enabled" apk off
fbss_dev_panels_showing: partial source of the profile page with the fbss form "enabled" as user 1
fbss_dev_panels_not_showing: partial source of the profile page with the fbss form "disabled" as user 1
fbss_dev_panels_showing_anonymous: partial source of the profile page with the fbss form "enabled" as anonymous
fbss_dev_panels_not_showing_anonymous: partial source of the profile page with the fbss form "disabled" as anonymous
fbss_dev_panels_showing_sidebar: partial source of the profile page with the fbss block enabled (in sidebar) as user 1
I hope this helps. If you want you can have admin access to this site as it is a test site. I can work on another one. Let me know and I will give you admin login and create an ftp acct. for you. Thank you for your work on this great module.
Chris
Comment #15
icecreamyou commentedThanks for the very complete report.
Your source indicates that two status update forms are being processed on the profile page, whether they actually end up being rendered or not. The way the JavaScript is currently set up, this will cause the NaN issue and possibly some other things as well. I don't know why that would be, nor do I have enough information to make a particularly useful guess, and unfortunately I still don't have the continuous block of time I would need to do a proper debugging session. Plus, Panels decided it would spontaneously stop working at all on my main dev site.
Although I don't have enough time to look into it more deeply right now, the fix may end up being a simple one. I finally figured out a trick in JavaScript that I think may eliminate this issue -- I'll work on it when I get a chance and hopefully this mystery issue will resolve itself with that update.
Comment #16
Canine Coaches commentedSounds good. I hope this is a simple fix. I am installing a new site right now, and I will leave this one as is (I might play with heartbeat a little). When you have the time let me know and I will give you logins (site and ftp) so you can work on this where the bug is already occurring. Hopefully that will save you some time. Good Luck. Thanks for your commitment to this module and for all your help.
Chris
Comment #17
ben.sullivan commentedI am experiencing an issue nearly identical to the one described in comment #14. I'm also using numerous modules, a garland faithful theme and running Drupal 6.15 with panels 6.3.3. I'm getting a "NaN characters remaining" error message and the same glitch mentioned above that's preventing the text field from clearing when clicked on. These errors only appear to occur on the profile page. I've checked the error on IE7, IE8, FF, Safari, Opera, Flock, and Chrome and it is consistent (I agree that it doesn't appear to be browser related, but as you've said, likely a js issue). I believe the issue occurred after upgrading from panels 6.3.2 to 6.3.3. I've tried deleting the fbss module and all related database entries and reverting back to the previous version of panels with no luck. I've also tried disabling all modules that were added around the time the glitch occurred with no luck, then disabling all but the core modules (same result). I think if you solve #14 you'll also resolve the issue I'm having as well. Looking forward to the js update in the works!
Thanks,
Ben Sullivan
Comment #18
Canine Coaches commentedI believe this is more of a panels (caching?) issue. heartbeat also does not "play well" with panels. I am leaving one test site up with these modules, and switching to a grid based theme and using homebox, which offers much more flexibility and customization (per documentation), this means more work, but I believe FBSS is undispensable, adn worth a liitle extra work to use it the way I want. I am just installing it now. I will not post here again to talk about this configuration, but you are welcome to contact me through personal contact form to see how this is working.
Comment #19
pribeh commentedI find this only happens for me when I've tried to display more than one FBSS form on the same panel-page. Otherwise I've tried to replicate this problem to help out here but I can't.
Comment #20
icecreamyou commented#19 is correct -- it only happens when there are multiple FBSS forms present. It's possible that there is a bug in another module (Panels) which causes Drupal to think there are multiple forms on a page when in fact there should not be -- but that is not an FBSS problem.
The reason I'm keeping this issue open is because I think I know how make it possible for multiple FBSS forms on the same page to work -- or at least, to not interfere with each other. I just have to get around to it.
Comment #21
michelleIn APK's case there is only the one form. I have no idea what could cause it to think there's more than one.
Michelle
Comment #22
icecreamyou commentedMy suspicion is that Panels doesn't completely stop the page it overrides from rendering, or something like that. Not APK's fault.
Comment #23
pribeh commentedI just upgraded my test site with FBSS to panels 3.3 and ctools 1.3 and voila: NAN. 3.2 worked just fine. Sorry I don't have any more info - I'm just confirming.
Comment #24
Platinum commentedKind of weird. Right now I have panels 3.3 and ctools 1.3, but I also got the NAN when I had panels 3.2 and older version of ctools.
Comment #25
pribeh commentedThat is weird. I switched back to 3.2/1.2 and it's working fine again for me.
Comment #26
Hiroaki commentedHow do I switch back to them? can i just overwrite the files in the module folder?
not a good way but for temporary solution I just added display: none; to the facebook-status-negative class in the module css. :P
Comment #27
pribeh commentedIf you have no choice you can sometimes get away with that however I would never recommend doing that. You should be making backups of your database prior to any update, at least on your live sites. You can then use backup and migrate (if you're not command prompt friendly) to revert the database back to a previous state. Then you can delete the newer version of the module and replace it with the older version.
Comment #28
icecreamyou commentedmerlinofchaos usually says that downgrading Panels/CTools causes all kinds of issues. You can try just overwriting the files, but it will probably cause more issues than it fixes. Pribeh is right -- you should always back up your site before upgrades so you can downgrade without major problems if you need to.
Comment #29
Hiroaki commentedThanks, this is my first try on drupal, so i still haven't learned or bothered to back up. Xd
I should have now that i cannot go back.
Comment #30
michelleI wouldn't spend too much time trying to go backwards... This problem existed before 3.3/1.3 was released so there's no guarantee going backwards is going to fix it for you.
Michelle
Comment #31
fugazi commentedsame problem with panels 3.3 and ctools 1.3
Comment #32
icecreamyou commentedI just committed a fix that should allow multiple forms to work on any page. That should fix this problem. The fix will be in the next dev.
This is a good change for FBSS, but it is not the best way to solve this problem. There is probably a bug in Panels somewhere that is the root cause. However, the symptoms should be gone.
Comment #33
michelleAwesome, thanks! I was planning on updating FBSS tonight anyway. :)
Michelle
Comment #34
fugazi commentedOh this is wonderful, it works. Many, many thanks. Fantastic.
Comment #35
Platinum commentedWorking here too. Thanks!
Comment #36
michelleAnd here as well. Thanks!
Michelle
Comment #37
pribeh commentedWorking.