I am facing issue in adding Submission Preparation Checklist. when I tried to add it is just loading but not adding the data.
Hi @aravindiitd2022,
Are you getting a spinning wheel? If so, that suggests that you should check your PHP error log. Also, coud you indicate which specific verison you’re using (e.g. 3.4.0-5) ?
-Roger
PKP Team
yes, I am getting the spinning wheel. I am using OJS 3.3
Solution for the problem.
Find the file “SubmissionChecklistForm.inc.php”
Replace this code part with below code
function execute(…$functionArgs) {
$request = Application::get()->getRequest();
$router = $request->getRouter();
$context = $router->getContext($request);
$submissionChecklistAll = $context->getData(‘submissionChecklist’);
$locale = AppLocale::getPrimaryLocale();
//FIXME: a bit of kludge to get unique submissionChecklist id’s
//$this->submissionChecklistId = ($this->submissionChecklistId != null ? $this->submissionChecklistId:(max(array_keys($submissionChecklistAll[$locale])) + 1));
// Check if the array is not empty before calling max()
if (!empty($submissionChecklistAll[$locale])) {
$this->submissionChecklistId = ($this->submissionChecklistId != null
? $this->submissionChecklistId
: (max(array_keys($submissionChecklistAll[$locale])) + 1));
} else {
$this->submissionChecklistId = 1; // Starting ID if the array is empty
}
$order = 0;
foreach ($submissionChecklistAll[$locale] as $checklistItem) {
if ($checklistItem['order'] > $order) {
$order = $checklistItem['order'];
}
}
$order++;
$checklistItem = $this->getData('checklistItem');
foreach (AppLocale::getSupportedLocales() as $locale => $name) {
if (isset($checklistItem[$locale])) {
$submissionChecklistAll[$locale][$this->submissionChecklistId]['content'] = $checklistItem[$locale];
$submissionChecklistAll[$locale][$this->submissionChecklistId]['order'] = $order;
}
}
$context->updateSetting('submissionChecklist', $submissionChecklistAll, 'object', true);
parent::execute(...$functionArgs);
return true;
}
}
This topic was automatically closed after 5 days. New replies are no longer allowed.