Invalid product name for theme plugin

We’re preparing our migration from OJS 3.3.0.14 to OJS 3.4.0.1, and the custom theme we’ve been using for some years is not working properly.

Cloning the plugin in ./plugins/themes/uqam-child will result in a blank plugin tab, with the following exception:

PHP Fatal error: Uncaught Exception: Invalid product name "uqam-child"

It took me a while to figure out that the dash in the folder name (uqam-child) was not allowed anymore in OJS 3.4. So I did the following steps:

  • I renamed the folder to uqamChild
  • I edited all the files accordingly.
  • I grepped the entire install to make sure I didn’t miss any occurrence of the string uqam-child
  • Finally, I emptied all the caches.

Doing so seemed to fix the problem: the plugin tab was showing up, with our theme in it.

However, activating the plugin will now result in an entire blank journal (both front and back end), with the same exception.

It’s just baffling: PHP keeps on logging Invalid product name "uqam-child" although that string is no longer showing up in the whole installation.

Any hint where I should look next?

Hi @nicolasd,

Check the versions table in the database, and the version.xml file in your plugin’s directory.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for the insight, @asmecher ! It looks like while developping the theme we changed the names of the plugin a few times, which resulted in several conflicting lines in the table versions. Can I just drop those obsolete lines?

Hi @nicolasd,

Yes, that should be fine. It may be referred to by name in the journal settings where the current theme is configured, but otherwise there shouldn’t be any ramifications. (As always, take a backup first before tinkering with the database directly!)

Thanks,
Alec Smecher
Public Knowledge Project Team

1 Like

Worked like a charm. Thanks a bunch !

1 Like