Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reported issues when using PHP 8.1 and other PHP version related issues #1143

Closed
2 tasks
ronm123 opened this issue Jul 26, 2022 · 2 comments
Closed
2 tasks

Comments

@ronm123
Copy link
Collaborator

ronm123 commented Jul 26, 2022

  • 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

@torinfo
Copy link
Collaborator

torinfo commented Jul 26, 2022

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(template_id.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.

@torinfo
Copy link
Collaborator

torinfo commented Jul 26, 2022

Even if apache mode is switched on, just the template_id is passed (without any '_')

I removed the substr function and just pass the template_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants