You are viewing the PKP Support Forum | PKP Home Wiki

Increasing length of language metadata

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

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.

Increasing length of language metadata

Postby sandyg » Wed Jul 17, 2013 5:39 pm


I've been asked to modify our local OJS installation (currently 2.3.6) to increase the length of the article metadata language field, which is currently limited to 10 characters. We have a journal that will be publishing in 5 languages, and our OJS librarian would like to be able to include the codes for all 5 in this field.

Looking at the source, it appears the only change required would be to:


to increase the value of the attribute "maxlength=10" applied to that input field.

The second change would be to the database structure, increasing the width of the 'articles.language' field, with a corresponding update to the XML schema files in the dbscripts folder.

I've recently inherited our OJS install and haven't done much work with the system yet, so I'm just hoping to get confirmation that these proposed changes should achieve the desired effect. Have I missed anything important here?

Alternatively, would this be an appropriate enhancement request for a future release?

Thanks... Sandy
Posts: 6
Joined: Wed Jul 17, 2013 4:53 pm

Re: Increasing length of language metadata

Postby asmecher » Thu Jul 18, 2013 9:35 am

Hi Sandy,

That's exactly the procedure I'd suggest. One minor addition: make the schema change in the DB descriptor file, dbscripts/xml/ocs_schema.xml. Otherwise, if you ever sync the descriptor against the DB, you risk chopping the column back down to 10 characters (and any data along with it). For upgrades, we tend to use a diff/patch procedure to migrate any modifications to new releases; using that process the schema change will also be propagated.

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

Return to OCS Development

Who is online

Users browsing this forum: No registered users and 0 guests