backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Fatal error after updating to 1.13.0 ("Cannot make static method EntityInterface::entityType() non static") #39

Closed PepeMty closed 5 years ago

PepeMty commented 5 years ago

Hey there. I just updated from 1.12.6 to 1.13.0. Everything seemed to go right. Site looks good, nothing seems broke. So I cleared caches and then ran cron only to receive this:

Fatal error: Cannot make static method EntityInterface::entityType() non static in class ParagraphsItemEntity in /home/sssssss/public_html/modules/paragraphs/ParagraphsItemEntity.inc on line 612

So cron didn't run.

Any ideas...? Should I revert to 1.12.6...?

Warm regards from sunny México.

José

laryn commented 5 years ago

@PepeMty I'll take a look. What version of Paragraphs? What version of PHP?

PepeMty commented 5 years ago

Thanks, laryn...! Paragraphs: 1.x-1.0.1 PHP: 7.2

laryn commented 5 years ago

@PepeMty FWIW, I saw something very similar on one site but unrelated to Paragraphs: https://github.com/backdrop-contrib/ubercart/issues/190

Interestingly, that site has Paragraphs installed, too, but didn't give me the error you got. Out of curiosity, can you change this line:

https://github.com/backdrop-contrib/paragraphs/blob/1.x-1.x/ParagraphsItemEntity.inc#L588

to static function... instead of public function... and see if cron runs then?

PepeMty commented 5 years ago

@laryn Well, well, well... It did work. I just changed the only instance of public function entityType() to static function entityType().

Now I have to remember this tiny change every time Paragraphs module is updated...

Thank you very much.

José

laryn commented 5 years ago

@PepeMty I will figure out what changed and make a new release of Paragraphs. It looks like this change in core may be what did it: https://github.com/backdrop/backdrop/commit/5741961928f43af00c146cede747eb16e1805aa9

laryn commented 5 years ago

@PepeMty Can you test/confirm this change on your end? https://github.com/backdrop-contrib/paragraphs/commit/997e3d6f4bb0f74f7b87af97f56ef35c2520f59d

PepeMty commented 5 years ago

@laryn Sorry for the tardy reply. Not sure what you want me to do. Although, I made this change in my site and now it works normally.

Jose

laryn commented 5 years ago

@PepeMty Heads up -- the next release reverts the change that caused this breakage and this will need to be "unpatched" on your site.

https://github.com/backdrop/backdrop-issues/issues/3809#issuecomment-495323262

PepeMty commented 5 years ago

@PepeMty Heads up -- the next release reverts the change that caused this breakage and this will need to be "unpatched" on your site.

backdrop/backdrop-issues#3809 (comment)

Got it. You did a great job nailing down this one. Thanks so much.

Warm regards from (way too) sunny México. José

jenlampton commented 5 years ago

Closing this issue. The core revert will make this change unnecessary (and problematic).