Closed ronm123 closed 1 year ago
Hmm. Somehow in PHP8.1 the tree structure of the workspace tree is different, i.e. the template_id is a number, not a string.
That means the the follwoing javascript fails:
function delete_template(template_id) {
$.ajax({
type: "POST",
url: "website_code/php/templates/delete_template.php",
data: {
template_id: template_id.substr(template_id.indexOf("_") + 1, template_id.length)
}
})
.done(function(response){
delete_stateChanged(response);
});
}
template_id.substr(templateid.indexOf("") + 1, template_id.length) failes, becasue template_id.indexOf does not exist.
But... I don't understand why that construct is there in the first place. I'll check on an install with htaccess apache shortcuts enabled.
Even if apache mode is switched on, just the templateid is passed (without any '')
I removed the substr function and just pass the template_id.
[ ] Had it reported and have verified that when using xerte 3.11x and PHP 8.1 there is a problem where you can't delete projects.
[ ] Also we already know that the oai-pmh harvesting code doesn't fully work with PHP 8.1 or 8.0