HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Member Profile page problems?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#100141 (In Topic #19653)
Avatar

Community saint

I've had some reports of some issues on the Member Profile pages and I've verified them but can't find the causes and I'm curious if anybody else is experiencing these issues with v9.0.9. One problem is with the Activity tab with syndicating enabled and the other is a tab and page formatting issue when switching back-and-forth between tabs. I've been able to replicate both issues on at least two different v9.0.9 installations. I haven't been able to test the Activity tab issue on my localhost test installation, but I can't seem to replicate the formatting issue on my test installation so I'm at a loss as to what the underlying cause is. So, I'm not sure if it's something out-of-sync with my installations, some odd combination of settings, or an addon that is causing the issues. I've done the file integrity scan from the upgrader and didn't see anything wrong there. I've also verified the issues occur in both IE10 and Chrome web browsers. I also disabled CloudFlare for a while to see if that might have been the cause, but it doesn't appear to be.

For the Activity tab problem, when a member clicks either of the buttons to start syndicating their activity to either facebook or twitter, the member can no longer load their own Activity tab; it just hangs there with the animated loading icon. However, other members can go to the same profile and view the Activity tab just fine. I'm not sure if this affects all members, but I know it does affect super-moderators using a Facebook login. If I remember correctly, if I log on as an admin and masquerade as the member having the issue, I can view the Activity tab just fine while masquerading. If I click the button to stop syndicating for that member, they can then view their Activity tab again.
 
The other problem is an odd formatting issue that shows up when moving from tab to tab in the Member Profile page. For this one, I can replicate the issues on multiple v9.0.9 installations, except for my localhost test v9.0.9 installation. I'm seeing two formatting issues; one seems to mainly affect admins (possibly related to the Edit tab?) and the other seems to affect everybody. For the issue that affects everybody, what happens is you can go from tab to tab and eventually go back to the main Profile tab and the whole body of the web site shifts up and gets hidden behind the header. If you go to this page and click from the Profile tab to the Points tab to the Blog tab to the Activity tab and back to the Profile tab, you should see the main body (with the left and right panels) all gets shifted up and partially hidden under the header. For the formatting issue that appears to mainly affect admins, clicking back-and-forth between tabs sometimes results in a formatting issue within some of the tabs; where some tabs will have an abnormally large empty space usually at the top, within the tab. The only thing that appears to be in common is that I think things seem to go wrong after the Points tab is clicked at some point. If I'm logged in as admin, I can go back and forth between the Profile and Blog tabs without issue. If I then click the Points tab and then then the Blog tab, the tab has a large blank area at the top and the blog content is way down the page. I think I can see why it's doing these things but don't know the underlying cause. From what I see while using the browser developer tools and inspecting the HTML of the page, the <div> code for the tabs have a style with either display: block; or display: none; and on the sites with the issue, these styles don't appear to be getting updated properly when switching tabs. On the localhost test site without the issue, the currently active tab always has display: block; and the the inactive tabs always have display: none; and these get updated properly when switching tabs. But the sites with the issue, I've seen it with only the main Profile tab has display: block; and the rest always have display: none; or, in at least one instance, they somehow all get switched to display: block;. I think not having the correct display attribute for the tabs is causing the formatting issue, but I don't see why it's happening on other installations but on not my local test installation O_o

If needed I can get some video of my screen illustrating the issues, but it will have to wait until later on Monday or Tuesday when my workstation PC is done rendering a video job.
Back to the top
 
Important!
Posted
Rating:
#100142
Avatar

Automated fix message

Jason Verhagen said

I've had some reports of some issues on the Member Profile pages and I've verified them but can't find the causes and I'm curious if anybody else is experiencing these issues with v9.0.9. One problem is with the Activity tab with syndicating enabled and the other is a tab and page formatting issue when switching back-and-forth between tabs. I've been able to replicate both issues on at least two different v9.0.9 installations. I haven't been able to test the Activity tab issue on my localhost test installation, but I can't seem to replicate the formatting issue on my test installation so I'm at a loss as to what the underlying cause is. So, I'm not sure if it's something out-of-sync with my installations, some odd combination of settings, or an addon that is causing the issues. I've done the file integrity scan from the upgrader and didn't see anything wrong there. I've also verified the issues occur in both IE10 and Chrome web browsers. I also disabled CloudFlare for a while to see if that might have been the cause, but it doesn't appear to be.

For the Activity tab problem, when a member clicks either of the buttons to start syndicating their activity to either facebook or twitter, the member can no longer load their own Activity tab; it just hangs there with the animated loading icon. However, other members can go to the same profile and view the Activity tab just fine. I'm not sure if this affects all members, but I know it does affect super-moderators using a Facebook login. If I remember correctly, if I log on as an admin and masquerade as the member having the issue, I can view the Activity tab just fine while masquerading. If I click the button to stop syndicating for that member, they can then view their Activity tab again.
 
The other problem is an odd formatting issue that shows up when moving from tab to tab in the Member Profile page. For this one, I can replicate the issues on multiple v9.0.9 installations, except for my localhost test v9.0.9 installation. I'm seeing two formatting issues; one seems to mainly affect admins (possibly related to the Edit tab?) and the other seems to affect everybody. For the issue that affects everybody, what happens is you can go from tab to tab and eventually go back to the main Profile tab and the whole body of the web site shifts up and gets hidden behind the header. If you go to this page and click from the Profile tab to the Points tab to the Blog tab to the Activity tab and back to the Profile tab, you should see the main body (with the left and right panels) all gets shifted up and partially hidden under the header. For the formatting issue that appears to mainly affect admins, clicking back-and-forth between tabs sometimes results in a formatting issue within some of the tabs; where some tabs will have an abnormally large empty space usually at the top, within the tab. The only thing that appears to be in common is that I think things seem to go wrong after the Points tab is clicked at some point. If I'm logged in as admin, I can go back and forth between the Profile and Blog tabs without issue. If I then click the Points tab and then then the Blog tab, the tab has a large blank area at the top and the blog content is way down the page. I think I can see why it's doing these things but don't know the underlying cause. From what I see while using the browser developer tools and inspecting the HTML of the page, the <div> code for the tabs have a style with either display: block; or display: none; and on the sites with the issue, these styles don't appear to be getting updated properly when switching tabs. On the localhost test site without the issue, the currently active tab always has display: block; and the the inactive tabs always have display: none; and these get updated properly when switching tabs. But the sites with the issue, I've seen it with only the main Profile tab has display: block; and the rest always have display: none; or, in at least one instance, they somehow all get switched to display: block;. I think not having the correct display attribute for the tabs is causing the formatting issue, but I don't see why it's happening on other installations but on not my local test installation O_o

If needed I can get some video of my screen illustrating the issues, but it will have to wait until later on Monday or Tuesday when my workstation PC is done rendering a video job.
This issue has been filed on the tracker as issue #1393, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#100143
Avatar

As for activities…

I suspect this is related to our oAuth token refresh. Theoretically oAuth tokens expire and Facebook requires you to routinely refresh them. We do this when a member goes to their own activity tab.

It's a real pain as it breaks our modularity. Facebook is a small component in the system, yet right up at the UI flow level, it expects us to take  an opportunity to visibly redirect the user through its servers to get a new token. There's no good formal mechanism for us to do that automatically in our browsing logic, so we have to kind of force a redirect in there sneakily.

It is mainly controlled by the sources_custom/hooks/systems/profiles_tabs/activities.php file.

I thought I'd fixed it in this commit:
https://github.com/chrisgraham/ocPortal/commit/94abfef024554b21e8e46f692b965df6cef54a74
(Sorry for my sloppy 'misc fixes' commits, but it's in there as the only change to the aforementioned file ;-))

Perhaps you just need to update the activities addon.

My change actually will disable the token refresh entirely as it is too annoying/risky. It now only does it if you visit the activities tab immediately (i.e. as the initial tab), and that does not practically happen. I did this as I concluded that Facebook currently does not actually require the token refresh as things currently stand. They've made some changes over time, and are very vague with their advice, but I believe for the case of a token that has been requested with posting access, and not via Javascript, it won't expire it.

Some background, as I do think this is worth documenting…

The file has this code:

Code

               } elseif ((running_script('index')) && (!$leave_to_ajax_if_possible) && ($ob->auth_is_set($member_id_of)) && (either_param('oauth_in_progress',NULL)===NULL) && (!$GLOBALS['IS_ACTUALLY_ADMIN']))
               {
                  // Do a refresh to make sure the token is updated
                  $url_map=array('page'=>'_SELF','type'=>'view','id'=>$member_id_of,'oauth_in_progress'=>1);
                  $url_map['syndicate_start__'.$hook]=1;
                  $oauth_url=build_url($url_map,'_SELF',NULL,false,false,false,'tab__activities');
                  $ob->auth_set($member_id_of,$oauth_url);
                }

This tells us that when oauth_in_progress is not set, and the tab has been requested as the initial tab (not via AJAX and not being laid out in preparation for AJAX), it will call the oAuth hook (Facebook) to request a new token, then redirect back from Facebook with oauth_in_progress set (to stop it looping).

So theoretically it should not lock/loop even without my fix, but there are so many complexities (points of failure/blockage, different complex subsystems with complex interfaces all needing to connect perfectly in sequence, tab Javascript, tab AJAX, redirects, Facebook, oAuth, privacy settings, network capability, etc) I'm not going to be surprised if it totally fails – which is why I disabled it in any real use case.
Alternate explanation why I disabled it (well, changed it to the way it is now defined): we don't care enough about activities to do the redirect when you hit your main profile tab (way too intrusive), but the activities loads via AJAX so we can't really do a redirect within an AJAX request either.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100144
Avatar

Oh, and the other possibility is there's just some JS error ;). So also it is worth checking the browser JS console, and if anything comes up inside the AJAX request for the activity tab.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100150
Avatar

Community saint

Thanks Chris! To confirm, I had the plupload addon installed on my local test installation but not on any of my other installations. For the Activities tab, I'll check the console for java related errors and I'll add some debug logging to the code for the tab and see if I can pinpoint where it's getting hung up.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: