$unit->offsetSet('previous_content_ID', $previousContentId); $unit->offsetSet('parent_content_ID', $parentContentId); //$unit -> offsetSet('data', $unit['data']); // vprountzos: I changed this because is was related to #5228 and used to empty the content $normalUnit = new EfrontUnit($unit['id']); $unit->offsetSet('data', $normalUnit['data']); $unit->persist(); $previousContentId = $id; } catch (Exception $e) { $errorMessages[] = $e->getMessage() . ' ' . $e->getCode(); } } } //echo $previousContentId;exit; } if (isset($_POST['repair_tree'])) { $currentContent->repairTree(); } if (isset($errorMessages) && $errorMessages) { header("HTTP/1.0 500 "); echo _ERRORSAVINGTREE . "\n" . implode("\n", $errorMessages); } } catch (Exception $e) { header("HTTP/1.0 500 "); echo $e->getMessage() . ' (' . $e->getCode() . ')'; exit; } } catch (Exception $e) { $smarty->assign("T_EXCEPTION_TRACE", $e->getTraceAsString()); $message = _ERRORLOADINGCONTENT . " " . $_SESSION['s_lessons_ID'] . ": " . $e->getMessage() . ' <a href = "javascript:void(0)" onclick = "eF_js_showDivPopup(event, \'' . _ERRORDETAILS . '\', 2, \'error_details\')">' . _MOREINFO . '</a>'; $message_type = 'failure'; }