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

Smarty Deprecation error #42

Open
munir-abbasi opened this issue Jul 10, 2024 · 5 comments
Open

Smarty Deprecation error #42

munir-abbasi opened this issue Jul 10, 2024 · 5 comments
Assignees
Labels
bug Something isn't working question Further information is requested support Support with configuration, installation and etc.

Comments

@munir-abbasi
Copy link
Contributor

I am getting this error.
screenshot is attached. It appeared after I tried to create a childtheme. However, it persists, even after disabling the child theme, updating to latest material theme.

is it, by any chance, associated with material theme?
Screenshot 2024-07-10 175548

@munir-abbasi
Copy link
Contributor Author

Please check this too.

@madi-nuralin madi-nuralin self-assigned this Jul 10, 2024
@madi-nuralin madi-nuralin added question Further information is requested support Support with configuration, installation and etc. labels Jul 10, 2024
@madi-nuralin
Copy link
Owner

I haven't examined this issue before, my assumptions:
It seems like the deprecation error involves to the newer version of smarty engine which you're using. According to smarty-php/smarty#962 we can't call static php methods directly anymore.
So that we need to apply the following trick:
https://www.smarty.net/docs/en/api.register.class.tpl

Nevertheless, those templates where overriden from the latest ojs repository.

@munir-abbasi
Copy link
Contributor Author

I actually posted here hoping to get help from you. I tried registering the classes with smarty and have visited the page you mentioned in your reply. It took me a week of constant trying. I did manage to make some errors disappear by tempering with the smarty_internal_templateparser.php but it was becoming alot tedious.

I actually have no coding background. I am just a hobbiyst who can google. :)
I reinstalled OJS, reinstalled the material theme after you updated it, and the error re-appeared. Found that it appears with the OJS default theme too.

Unless the OJS team comes up with a solution, I think the only option I have is to downgrade smarty to get rid of this error.

@madi-nuralin
Copy link
Owner

Fine,
For the moment I'm a little busy. After all, this project is kind a hobby for me, and I don't always have time to maintain the repository.

But I will consider this issue in the near future, let’s leave this issue open (possibly with milestone v3_0_2-0). I need to analyze the theme's compatibility with the latest version of the Smarty engine.

On the other hand, as you mentioned, such coding practices are widespread throughout the pkp/ojs project, so fixing them quickly is quite problematic.

And thank you for reporting issue!

@madi-nuralin madi-nuralin added this to the v3_0_2-0 milestone Jul 11, 2024
@madi-nuralin madi-nuralin added the bug Something isn't working label Jul 11, 2024
@munir-abbasi
Copy link
Contributor Author

Thank you.
I understand that most of these projects are individual projects, hobby usually. I am currently trying to find a solution. If and when I find one, I will report back.

@madi-nuralin madi-nuralin modified the milestones: v3_0_2-0, v3_0_3-0 Sep 6, 2024
@madi-nuralin madi-nuralin removed this from the v3_0_3-0 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested support Support with configuration, installation and etc.
Projects
None yet
Development

No branches or pull requests

2 participants