- Posts: 2
COMMUNITY FORUM
"Items must have a title" msg after 2.6.8 update
- webjo
- Topic Author
- Offline
- New Member
Less
More
10 years 6 months ago - 10 years 6 months ago #126500
by webjo
"Items must have a title" msg after 2.6.8 update was created by webjo
After updating from K2 2.6.7 to 2.6.8 (Joomla 2.5.19) the "Item must have a title" notice loads on the screen whenever a front-end user either creates or edits an existing item. It happens before the item form content fully displays.
This occurs on items that have been in the database (with a title) for months, and did not occur before the update to 2.6.8.
This message should only display if the user tries to save/submit the form without an entry in the title field, not before the form loads.
If the form is saved without a title, a 404 error displays in the modal window instead of the "Item must have a title" notice.
Any clues on what changes in 2.6.8 might be causing this error?
Thank you.
This occurs on items that have been in the database (with a title) for months, and did not occur before the update to 2.6.8.
This message should only display if the user tries to save/submit the form without an entry in the title field, not before the form loads.
If the form is saved without a title, a 404 error displays in the modal window instead of the "Item must have a title" notice.
Any clues on what changes in 2.6.8 might be causing this error?
Thank you.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 6 months ago #126501
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: "Items must have a title" msg after 2.6.8 update
Hi. Do you have any third-party K2 plugins installed? Do you use any SEF extension? Also check your page for javascript errors. Finally ensure that you have not any overrides to the itemforn.php.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- James Garrett
- Offline
- New Member
Less
More
- Posts: 2
10 years 6 months ago #126502
by James Garrett
Replied by James Garrett on topic Re: "Items must have a title" msg after 2.6.8 update
Re the 'item must have a title' error
this is caused by the submit button function being triggered as the modal popup closes and opens when the title has no value - this can be changed or removed in the itemform.php template override. Clearly there is a script conflict somewhere but I cannot find it.
I 'fixed' it by wrapping the offending if statement in another if statement as below, so the alert could only trigger on save. Hope this helps figure out what the problem is...
$document->addScriptDeclaration("
Joomla.submitbutton = function(pressbutton){
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if (pressbutton == 'save') { // HERE is the extra condition that I wrapped the offending condition in
if (\$K2.trim(\$K2('#title').val()) == '') {
alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' );
}
else if (\$K2.trim(\$K2('#catid').val()) == '0') {
alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' );
}
else {
syncExtraFieldsEditor();
\$K2('#selectedTags option').attr('selected', 'selected');
submitform( pressbutton );
}
} // obviously close the extra if statement
}
");
this is caused by the submit button function being triggered as the modal popup closes and opens when the title has no value - this can be changed or removed in the itemform.php template override. Clearly there is a script conflict somewhere but I cannot find it.
I 'fixed' it by wrapping the offending if statement in another if statement as below, so the alert could only trigger on save. Hope this helps figure out what the problem is...
$document->addScriptDeclaration("
Joomla.submitbutton = function(pressbutton){
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if (pressbutton == 'save') { // HERE is the extra condition that I wrapped the offending condition in
if (\$K2.trim(\$K2('#title').val()) == '') {
alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' );
}
else if (\$K2.trim(\$K2('#catid').val()) == '0') {
alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' );
}
else {
syncExtraFieldsEditor();
\$K2('#selectedTags option').attr('selected', 'selected');
submitform( pressbutton );
}
} // obviously close the extra if statement
}
");
Please Log in or Create an account to join the conversation.
- Luciano
- Offline
- Junior Member
Less
More
- Posts: 32
10 years 4 months ago #126503
by Luciano
Replied by Luciano on topic Re: "Items must have a title" msg after 2.6.8 update
Hi! same issue, I found the problem here was "Little Helper in Status" module from "Little Helper" admin tools.
Just unpublished it and everything is fine again.
Just for the record.
Just unpublished it and everything is fine again.
Just for the record.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 4 months ago #126504
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: "Items must have a title" msg after 2.6.8 update
@Luciano
Thanks for the feedback.
Thanks for the feedback.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Riccardo Zorn
- Offline
- New Member
Less
More
- Posts: 2
10 years 2 months ago #126505
by Riccardo Zorn
Replied by Riccardo Zorn on topic Re: "Items must have a title" msg after 2.6.8 update
Hello,
I just stumbled upon this post thanks to a user notification, and fixed the issue in the latest 2.1.4 version of LittleHelper, which includes also the new favicon drag n crop features.
You may download it on fasterjoomla.com .
Please do inform the developers of any issue you find: unless you let them know, they won't be able to fix stuff. And it's always appreciated when you let us improve our software.
I just stumbled upon this post thanks to a user notification, and fixed the issue in the latest 2.1.4 version of LittleHelper, which includes also the new favicon drag n crop features.
You may download it on fasterjoomla.com .
Please do inform the developers of any issue you find: unless you let them know, they won't be able to fix stuff. And it's always appreciated when you let us improve our software.
Please Log in or Create an account to join the conversation.