OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Too long a title?

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.

Too long a title?

Postby nef » Thu Nov 26, 2009 12:54 pm

Hi,
It looks like OJS is setting a limit for how many words you can use in your article title. Is that true? If so, why do you set a limit?
Kind Regards
Niels Erik
nef
 
Posts: 240
Joined: Fri Jun 01, 2007 2:56 am
Location: Aarhus, Denmark

Re: Too long a title?

Postby jmacgreg » Wed Dec 02, 2009 1:48 pm

Hi Niels,

The HTML form may be setting a limit (which was probably chosen as a reasonable default), but you can change that by editing the relevant template file, in this case templates/author/submit/step2.tpl in OJS 2.2.x (step3.tpl for OJS 2.3.x). Try finding the textfield with id="title" in that file and extending the field's maxlength.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Too long a title?

Postby szmigieldesign » Thu Jul 24, 2014 2:19 pm

Hello,

I've stumbled upon an article which title contains 480 characters which is out of OJS limit.

Will modifying .tpl files help or is there some hard-coded database-based limit that I should be aware of? If it's possible via .tpl files - can OJS developers point me to which templates should I modify please (eg. quick submit, editor view, etc.)?
szmigieldesign
 
Posts: 30
Joined: Thu Aug 30, 2012 2:22 am
Location: PL

Re: Too long a title?

Postby asmecher » Thu Jul 24, 2014 3:55 pm

Hi szmigieldesign,

What version of OJS are you using? The details will vary.

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

Re: Too long a title?

Postby szmigieldesign » Fri Jul 25, 2014 4:51 am

asmecher, I'm using the latest OJS - 2.4.4.1.
szmigieldesign
 
Posts: 30
Joined: Thu Aug 30, 2012 2:22 am
Location: PL

Re: Too long a title?

Postby asmecher » Fri Jul 25, 2014 9:05 am

Hi szmigieldesign,

In that case, you can extend the template limits; the database uses a TEXT type (in MySQL) that will already handle long content.

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

Re: Too long a title?

Postby szmigieldesign » Sat Jul 26, 2014 5:07 am

Thank you, asmecher. I'll do some research to find all templates with article title.

One last question - could you please confirm that in this OJS version all article title textfields have id="title" and it's unique title ID in all templates? Or do ID's vary from template to template, i.e. "title", "articleTitle", etc.?
szmigieldesign
 
Posts: 30
Joined: Thu Aug 30, 2012 2:22 am
Location: PL

Re: Too long a title?

Postby asmecher » Mon Jul 28, 2014 11:43 am

Hi szmigieldesign,

As far as I can recall, the title field should be named consistently. If you're looking in the template files, the syntax for the input field will look like this:
Code: Select all
<input type="text" class="textField" name="title[{$formLocale|escape}]" id="title" value="{$title[$formLocale]|escape}" size="60" maxlength="255" />
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9049
Joined: Wed Aug 10, 2005 12:56 pm

Re: Too long a title?

Postby szmigieldesign » Mon Aug 04, 2014 12:25 pm

Thank you for your help, asmecher.

It looks like there are plenty of advanced customization options on the smarty side! Too bad that modifying them makes upgrading OJS much harder.
szmigieldesign
 
Posts: 30
Joined: Thu Aug 30, 2012 2:22 am
Location: PL

Re: Too long a title?

Postby asmecher » Tue Aug 05, 2014 8:16 am

Hi szmigieldesign,

There are numerous standard tools to help with this. For our own hosting, we use git; previously, we used diff/patch to manage modifications on upgrade. Either makes it easy to extract and re-apply modifications when upgrading code.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests