Hello,
I use the FBSS on user profiles in Quicktabs via
$account = user_load(array('uid' => arg(1)));
$size = variable_get('facebook_status_size_long', 40);
$view = 'facebook_status';
echo theme('facebook_status_form_display', $account, $size, $view);
After upgrading from FBSS 6.x-2.0-rc2 (which worked awesome) to 6.x-2.0 I noticed the following problems:
1. The Admin menu disappeared completely on pages where FBSS is rendered - even from html source code.
2. QuickTabs have lost their AJAX functionality on pages where FBSS is rendered -> every click on a QuickTab forces a page reload.
3. If I delete the current status FBSS takes automatically the latest status before and uses it as current so the only chance to have really no entries is to delete all.
4. When I try to publish a new status and click on the "Share" button I'm going to be redirected to mysite.com/share-status where a WSOD with weird text is visible -> see attached screenshot. Here is the content from the WSOD textarea:
{ "status": true, "updaters": [ ], "debug": [ ], "messages_error": [ ], "messages_status": [ ], "messages_warning": [ ], "redirect": null, "preview": null, "form_id": "facebook_status_box", "options": { "enabled": true } }
As suggested, I upgraded to the latest dev (from Nov 18. 2009), ran update.php and cleared all caches but nothing changed. I also uninstalled the FBSS completely and re-installed it but with the same result. I tested the FBSS code standalone (without QuickTabs) but also here I had the same problems.
I hope you can reproduce this. If not it would be great to get to know how to uninstall and delete everything that belongs to the current FBSS installation to install a clean and working version to get things up & running.
Please let me know if you need more info.
Help is much appreciated.
Thank you,
Stefan
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot | 4.38 KB | design.er |
Comments
Comment #1
icecreamyou commentedRe: #3, just submit a blank status to clear your status. That functionality has been that way since FBSS 1.0.
What Ajax mode is your Quicktabs block set to? FBSS will have some problems if it's in a tab loaded after the rest of the page (i.e. if the FBSS block is not the first one loaded and Ajax mode is set to "Yes") although it still wouldn't cause the problems you describe except maybe #4.
I can't reproduce any of this, so you're going to have to work with me if you want to figure this out. (Just uninstalling FBSS, by the way, removes everything associated with it except the files. During your upgrade, you should have deleted the entire facebook_status folder before unpackaging the tarball, and you should do the same if you downgrade.) Try using the default Facebook-style Statuses block (with and without Quicktabs) and see if you get the same problems. Try going to yoursite.com/share-status and posting from there.
Try this code too:
Did you override your profile or could it be rendering FBSS in the background? Have you checked all your settings and reverted your Views? Did you upgrade any other modules at the same time as FBSS? Have you overridden or edited anything in FBSS?
There are lots of changes between RC2 and 2.0, but none that should affect any of this.
Comment #2
design.er commentedThank you very much for your help.
It's still not possible to embed the facebook status with theme(...) commands. But now it seems to work (almost perfectly) with
$account->content['facebook_status']['status']['#value']- even in QuickTabs. I tried it the some days before and it didn't work. I'm not sure what happened - maybe after the third un- and re-install something supernatural happened. :)Now QuickTabs has its ajax magic back, the admin menu appears, even the chars countdown works (what didn't in rc2) and (I guess) the views is going to updated in realtime without page refreshes. "I guess" because when I click on 'submit' I see the ajax throbber and then how the whole facebook block disappears without page refresh -> the status input and view.
I think that the FBSS' AHAH is forcing the block to disappear. If I deactivate the AHAH checkbox on FBSS settings page it works - of course only after page refresh but nothing disappears. I installed the suggested Ajax Views Refresh module and activated the 'Facebook-style Statuses update form' checkbox and Ajax in Views itself but without any effect.
Of course I also tested all this things without QuickTabs as standalone
$account->content['facebook_status']['status']output.Any ideas what the problem may be?
Comment #3
icecreamyou commentedPlease just do what I suggested in #1, or say directly that you did everything that I suggested, and answer all of my questions.
One of the interesting things that I've observed from maintaining this issue queue is that very rarely are people right about what's causing their problem. This is one of those cases, and it doesn't require any understanding of JavaScript to read
facebook_status.jsand realize that it has nothing to do with what you're experiencing. The AHAH updating that FBSS uses is a Form API behavior in Drupal core.I don't know how you got it in your head to use
$account->content, but you shouldn't be using it unless you're literally editing user-profile.tpl.php.This really sounds like a caching or file conflict problem to me. Perhaps try manually emptying all the cache tables in your database, including the views cache tables.
Also, what theme are you using?
Comment #4
icecreamyou commentedAny progress?
Comment #5
d0t101101 commentedAlso interested...
After I ran into this problem, in addition to other suggestions, i've tried using a views theming override in my highly customized theme, by creating a tpl.php file to alter the views display. The file is named:
views-view--profile-statuses.tpl.php (corresponds to my custom view name of course)
Inside of this, below the header div, I've inserted:
While the form appears as desired in my programatically created quicktab, unfortunately it breaks the ajax functionality of quicktabs, when QT AJAX is set to TRUE...
My search for a clean solution continues, as I don't want to enable the php input filter as suggested here in the quicktabs issue tracker:
http://drupal.org/node/544466
Will update this thread once resolved. Ultimately I just want to display the FBSS form in the proper context above a view showing the recent status updates, in a quicktab, on the profile page for each user.
Comment #6
icecreamyou commented@d0t101101: It's nearly if not totally impossible to make anything context-sensitive if you intend to load it with AJAX, including the FBSS form/view. That's because AJAX loading is done by transferring content from a page like "quicktabs/js" where the updated quicktab is rendered. Because the rendering happens there, it has no way to know where it was called from originally.
However, recent experience adding AHAH-refreshing to the Shorten URLs module has given me some insight into the original problem in this issue, thanks to having the same problem of the admin_menu disappearing. That seemed to happen when the JQuery for the relevant form was loaded, but couldn't find the form on the page. Normally this should never happen because the JQuery should only get loaded when a form gets loaded. However, there is probably something funky going on when the form gets loaded via AHAH.
In sum, it's remotely possible that I would be able to fix this if I could reproduce it, but I can't reproduce it at all, and I may even be completely wrong about the reasons. (The fix would involve checking to see if the form exists in the JQuery before performing operations upon it.)
I will think about this some more and possibly talk to Quicktabs people to see if they have any thoughts. But it may turn out that this is just unsolvable.
Comment #7
design.er commentedSorry for the delayed response. I tested some things - de-/activated javascript-related modules and tried to use the facebook status profile block outside the profile - but couldn't find out why the the form and view are disappearing after submitting a new status. I just find out that this behavior is also present outside of user profiles.
To answer your questions:
I created a custom theme based on garland and use the user-profile.tpl.php, that's why I use
$account->content.And I tried everything you've suggested to do in your first response - sorry that I didn't mention this - and cleared all the caches manually from the database but nothing changed, unfortunately.
I have to upload the project on the test server this week so if you like I could provide you access to the backend and send you the user-profile.tpl.php file so you could take a look. Maybe this will help to understand and even solve the problem.
Thank you very much for your help.
Comment #8
icecreamyou commentedBackend access would certainly help me solve this if my theory is right. Let me know when I can take a look.
Comment #9
icecreamyou commentedMarked #642626: Problem with ajax update on "Share" as duplicate.
Comment #10
design.er commentedYehaa... with the todays upgrade to the latest dev the bug is gone -> the FBSS form + view don't disappear after submitting a new status. I'm really happy because my project goes on stage in a few days and the biggest problem is solved now.
Thank you very much! ...you made my day. :))
Comment #11
icecreamyou commentedInteresting... so the problem wasn't Quicktabs after all then, it was the AJAX module. All that changed in today's dev build was that I dropped support for the AJAX module. Maybe the attribute #ajax conflicted with something in core or quicktabs.
Comment #12
d0t101101 commentedThanks design.er & IceCreamYou!
The latest dev version fixed my issues with the FBSS form and QuickTabs, too.
.