1 / 2
Sep 2023

Good morning, I need to migrate some custom modules developed in the very old version 1.9 to the current 23.1 . I fixed all PHP 5.6 statements that are no longer compatible with version 8.1 . Where required I added the settings in the global variables. I have 2 problems, some modules, once installed, have the following error:

Call to a member function read() on null (0)

specifically, the code there is $this->tmpl->read($index); , which is instantiated with $this->tmpl = CreateObject(‘etemplate.etemplate’);

the second error that occurs, in other modules, is as follows:

Call to undefined function create_select_box() (0)

How can I resolve these errors ?
Thank you.

  • created

    Sep '23
  • last reply

    Sep '23
  • 1

    reply

  • 447

    views

  • 2

    users

  • 2

    links

Hi Giovanni,

Hmm, that should not be possible, CreateObject will either throw an exception or return the instantiated class, it can not return NULL. You must miss something …

CreateObject('etemplate.etemplate') instantiate to old eTemplate class from the deprecated, and by default NOT installed etemplate app. You either have to install it and it dependency the old API (phpgwapi), or migrate to new Api\Etemplate class, which is mostly compatible.

I have no idea about that function, not aware it’s provided by either the old nor our current API.

Searching for it, I found only one reference to it’s name in the old translation-tools:

So it probably existed at some point in time, but not anymore.

Ralf

Suggested Topics

Want to read more? Browse other topics in Developers or view latest topics.