OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Deactivating user registration bug

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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Deactivating user registration bug

Postby geirrosset » Thu Aug 29, 2013 6:47 am

Hi all

None of our journals' editorial staff use OJS. As such we have deactivated user registration. Problem is that on our front page it still says register behind every journal, and if you click it an error pops up:
Fatal error: Call to a member function url() on a non-object in /home/9/w67401/ojs/pages/user/UserHandler.inc.php on line 465

My question is this. Shouldn't the Register link disappear once registration has been turned off?

Best regards
Geir Rosset
geirrosset
 
Posts: 40
Joined: Tue Aug 30, 2011 1:57 am

Re: Deactivating user registration bug

Postby asmecher » Thu Aug 29, 2013 9:24 am

Hi Geir,

Thanks for reporting -- I found a bug in the "registration disabled" message page. You can fix it by applying the patch at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8409.

As that suggests, rather than the "registration" link disappearing entirely, the user is being sent to a page explaining that registration is currently disabled. Check Journal Setup to see if registration for reviewers, readers, and authors are available -- if none, and if you're looking at a journal-specific page, the registration link should be hidden. If one is available, or if you're looking at a site-wide page, the link will be visible.

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

Re: Deactivating user registration bug

Postby geirrosset » Fri Aug 30, 2013 12:45 am

I'm on 2.3.7 and my RegistrationHandler.inc.php already reads:

/**
* Show error message if user registration is not allowed.
* @param $args array
* @param $request PKPRequest
*/
function registrationDisabled($args, &$request) {
$this->setupTemplate($request, true);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('pageTitle', 'user.register');
$templateMgr->assign('errorMsg', 'user.register.registrationDisabled');
$templateMgr->assign('backLink', $request->url(null, 'login'));
$templateMgr->assign('backLinkLabel', 'user.login');
$templateMgr->display('common/error.tpl');

So the two lines the patch tells me to add are already there as far as I can see. What then?

Geir
geirrosset
 
Posts: 40
Joined: Tue Aug 30, 2011 1:57 am

Re: Deactivating user registration bug

Postby asmecher » Fri Aug 30, 2013 12:18 pm

Hi Geir,

Hmm, is it possible that your code mixes different versions of OJS, or that a modification is causing this problem? Looking at line 465 of pages/user/UserHandler.inc.php in OJS 2.3.7, I see...
Code: Select all
$subscriptionForm = new UserInstitutionalSubscriptionForm($userId);
...which doesn't refer to the "url" function that the error message is reporting.

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

Re: Deactivating user registration bug

Postby geirrosset » Mon Sep 02, 2013 4:57 am

If that could be caused by an error during upgrade that is possible. We have several other issues, although none serious. Things like missing translations. We have not modified any files manually.

How can I check, and how could we fix this to make sure we are running a clean 2.3.7 or even upgrade to a clean 2.4.2 (we are somewhat reluctant to upgrading to 2.4.2 as things are working well at the moment with the obvious exception). Can we replace the entire installation with a clean 2.4.2 and point it to our current database? Will that update the database?

I wish it was as painless as upgrading WordPress. Is a OneClick auto upgrade planned for any future releases (like 3.0)?

Geir
geirrosset
 
Posts: 40
Joined: Tue Aug 30, 2011 1:57 am

Re: Deactivating user registration bug

Postby asmecher » Tue Sep 03, 2013 8:59 am

Hi Geir,

Have a look at the "full package" upgrade process documented in docs/UPGRADE; it's roughly what you're looking for.

If you want to know how your current installation diverges from the stock distribution, use the "diff" tool to compare the two and generate a patch file describing the differences. You can then review that patch file to see if it makes sense.

WordPress has a couple of advantages on us: it's a much smaller application (content management involves less volume of code than workflow) and it doesn't have to worry about database abstraction (we have to support both MySQL and PostgreSQL). But we are looking at Wordpress and others for ways to make the upgrade easier.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 4 guests