OJS 3.1 Create New Subscription Type => "Please use the checkbox provided" error

Hi,

In OJS3.1 while trying to create a new subscription type I keep on getting a “Please use the checkbox provided” error. I can not see any reason why the error would happen with the form data I have given.

Screenshot_12

This happens only if one of the “Options” is checked. If both are empty, then the form is saved without errors.

So @asmecher I guess that these validators have a problem: https://github.com/pkp/ojs/blob/master/controllers/grid/subscriptions/SubscriptionTypeForm.inc.php#L75-L79

@asmecher, I am not sure if those validators are even needed with the checkboxes?

For example, I am looking at the section creation form and I can not find any validators for the checkboxes there: https://github.com/pkp/ojs/blob/master/controllers/grid/settings/sections/form/SectionForm.inc.php

And a related issue here. Now that I removed the validators for testing and add select a checkbox there, the selection is not active anymore after I go back to edit the subscription type.

Hi @ajnyga,

I accidentally left part of the membership aspect of the subscriptions implementation incomplete – if you turn off the “Membership” checkbox you should be OK. I’ve filed this for attention over at Fix membership options · Issue #2962 · pkp/pkp-lib · GitHub. Frankly I will need to review what the requirements for membership purchase (as opposed to non-membership subscriptions), as I have never worked with this before, so your use case would be helpful.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok good to know. I was actually trying to test how it works in OJS3. I think that in OJS2 the membership code did not do much? Meaning that it was only possible to visually check for those codes.

Here is a brief presentation how the plugin I am planning to do for OJS3 works. This is a version I made for OJS2 before it came apparent that OJS3 will be ready during our project and we can use it in our new service. I did a quick & dirty translation from Finnish: https://drive.google.com/file/d/0B2-Fk_aieQXmeG5ObHoxVkhXbFk/view?usp=sharing

Note that the error also occurs if I only check the “Do not make this subscription type publicly available or visible on the website.” selection.

Also in this subscription part of OJS 3.1:

Both in the subscription types tab and under the individual/institutional subscriptions tab, if I edit an existing subscription or a subscription type, drop-down menus switch to the first item of the list, and do not store the previously existed settings. For example if you edit an existing subscription type, the currency goes back to Afghani (AFG), and the subscription type to Online.

This is on the one hand misleading to subscriptiion editors (I thought I did not choose the proper item from the drop-down or that there is a glitch in the code, which is not the case). On the other hand it is very confusing if you renew a user’s existing subscription by clicking on Edit, because you lose the information which subscription type the user previously had.

Hi @czirfusz,

Is this using OJS 3.1.0-0, or OJS 3.1.0-1?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec, this is OJS 3.1.0-1.
Many thanks for looking at this issue!

Hi @czirfusz,

For the subscription type currency problem, see issue 3184 – there are patches there to resolve the problem.

Regards,
Alec Smecher
Public Knowledge Project Team

Great! Thank you, Alec.
Further suggestions to make it coherent:

  • subscriptionTypeForm.tpl line 40 “selected=$format” instead of “value=$format”
  • institutionalSubscriptionForm.tpl line 30 “selected=$typeId” instead of “value=$typeId”
  • institutionalSubscriptionForm.tpl line 31 “selected=$status” instead of “value=$status”
  • individualSubscriptionForm.tpl line 30 “selected=$typeId” instead of “value=$typeId”
  • individualSubscriptionForm.tpl line 31 “selected=$status” instead of “value=$status”

(Please check it, I am not familiar with code.)

Hi @czirfusz,

Ah, good spotting – I’ve added those to the issue above (and found another besides). There are now two patches listed to resolve all of these kinds of problems.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like