OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



UserProfile from Enrollment Page Displays Same User for All

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

UserProfile from Enrollment Page Displays Same User for All

Postby uscguitarte » Tue Jul 09, 2013 12:55 pm

Hi All,

We recently upgraded from 2.1.1.0 to 2.4.2.0 and have run into a bug on our Enrollment listing page:
manager/people/all

When we click on a username in the listing - we are always shown the same user (userID 26) but the URL shows the userID we would really want to view:

For example:
manager/userProfile/7903
manager/userProfile/102
manager/userProfile/4000

All show the same user (userID 26) - not the user that we wanted to view.

I've looked at the recommended patches and searched the forums but haven't found a solution. Is there something you can recommend me to take a look at? There are no PHP errors or Apache errors when loading the userProfile page.

Logging in as a specific user and editing those users work fine:
manager/editUser/7903
manager/signInAsUser/102

Thanks,
Chris
USC Annenberg
uscguitarte
 
Posts: 14
Joined: Mon Apr 29, 2013 4:53 pm

Re: UserProfile from Enrollment Page Displays Same User for

Postby asmecher » Tue Jul 09, 2013 1:15 pm

Hi Chris,

What version of PHP are you running?

Are there any local modifications to your installation?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: UserProfile from Enrollment Page Displays Same User for

Postby uscguitarte » Tue Jul 09, 2013 3:10 pm

Hi Alec,

We're running PHP version 5.3.14

And we have some local modifications to the installation.

I've replaced my local dev copy with a fresh copy of 2.4.2.0 and replaced only the config file. Clicking on the user links does indeed work with the fresh copy of 2.4.2.0.

I isolated the issue to a custom block plugin I created to recreate the editorialTeam listing of users as a block that can be placed on the sidebars. When I removed the custom plugin - it works as expected.

I've further isolated the issue to the block.tpl file of my custom plugin:
Code: Select all
{foreach from=$groups item=group}
<div id="group">
   <h4>{$group->getLocalizedTitle()}</h4>
   {assign var=groupId value=$group->getId()}
   {assign var=members value=$teamInfo[$groupId]}

   <ol class="editorialTeam">
      {foreach from=$members item=member}
         {assign var=user value=$member->getUser()}
         <div class="member"><li><a href="javascript:openRTWindow('/index.php/xSite/about/editorialTeamBio/{$user->getId()}')">{$user->getFullName()|escape}</a>
         {if $user->getLocalizedAffiliation()}
         <br /><span class="affiliation">{$user->getLocalizedAffiliation()|escape}</span>{/if}
         </li></div>
      {/foreach}{* $members *}
   </ol>
</div>
{/foreach}{* $groups *}


When I remove this section of code which prints the editorial team in the block - the links work again.

Thanks for your assistance!
Chris

asmecher wrote:Hi Chris,

What version of PHP are you running?

Are there any local modifications to your installation?

Regards,
Alec Smecher
Public Knowledge Project Team
uscguitarte
 
Posts: 14
Joined: Mon Apr 29, 2013 4:53 pm

Re: UserProfile from Enrollment Page Displays Same User for

Postby uscguitarte » Tue Jul 09, 2013 3:25 pm

Hi Alec,

Thanks for the suggestion to look at my modified code - there was a collision in the variable used to write out the group members of the editorialTeam.

I replaced the var=user with var=userEboard and now the page works correctly.

Code: Select all
      {foreach from=$members item=member}
         {assign var=userEboard value=$member->getUser()}
         <div class="member"><li><a href="javascript:openRTWindow('/index.php/xSite/about/editorialTeamBio/{$userEboard->getId()}')">{$userEboard->getFullName()|escape}</a>
         {if $userEboard->getLocalizedAffiliation()}
         <br /><span class="affiliation">{$userEboard->getLocalizedAffiliation()|escape}</span>{/if}
         </li></div>
      {/foreach}{* $members *}


Cheers,
Chris
uscguitarte
 
Posts: 14
Joined: Mon Apr 29, 2013 4:53 pm

Re: UserProfile from Enrollment Page Displays Same User for

Postby asmecher » Tue Jul 09, 2013 3:33 pm

Hi Chris,

Glad to hear it's working.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 1 guest