Hi @bozana, @asmecher , @ajnyga , @israel.cefrin
in ojs 3.1.1-2 i got this error “cannot instantiate abstract class Submission”
as you can see in attached image !
what is this error please explain to me
Thanks in advanced
Hi @bozana, @asmecher , @ajnyga , @israel.cefrin
in ojs 3.1.1-2 i got this error “cannot instantiate abstract class Submission”
as you can see in attached image !
what is this error please explain to me
Thanks in advanced
Hi @mbabaei,
Do you have some custom code in your installation? Anywhere you see SubmissionDAO
referenced, the system should actually be using its subclass ArticleDAO
. The ArticleDAO
class provides an implementation to newDataObject
that should prevent this from happening. (You could turn on the show_stacktrace
option to get a helpful stack trace out of your system rather than just the error message.)
Regards,
Alec Smecher
Public Knowledge Project Team
I think the screenshot shows an intellisense error. The dev tool recognizes Submission
as abstract class and therefore shows the error as displayed. Nevertheless i think it’s a bug because newDataObject
should be an abstract function (which would work as SubmissionDAO
is already an abstract class). Why is this not the case? Any specific reason?
No, This is OJS 3.1.1-2 original files
I should say that there isn’t any error on ArticleDAO but i thing there is a error on sumissionDAO and it has missing structure
Hi all,
Ah, @j1shiin is correct – I misread your first post as suggesting that the error was coming up in OJS, rather than your IDE. I’ve changed Submission::newDataObject
to be abstract
rather than having a nonsensical implementation. This change is just cosmetic as far as the application is concerned. (See Explicitly define Submission::newDataObject as abstract · pkp/pkp-lib@96eac39 · GitHub for the commit.)
Regards,
Alec Smecher
Public Knowledge Project Team