Page 1 of 1

Module error Using $ this when not in object context

Posted: 28 Jul 2021, 09:07
by Primorsky
Hi,
I have a problem showing a panorama through a module. I tried to solve it myself by completely reinstalling the system, but I couldn't. There is also no information on the forum.

Essence of the question:
A panorama is created through the component.
Next, a module is created and placed on the site page (a regular protostar template)
Instead of a panorama, an error is always issued:
Using $ this when not in object context

/home/inst642127/123rent.ru/docs/modules/mod_phocapanorama/mod_phocapanorama.php:47

If you place the component through the menu, then all panoramas are displayed. The problem is solely in displaying a specific panorama on the site through the module.

Component settings do not give any results.

I ask for help.

Re: Module error Using $ this when not in object context

Posted: 28 Jul 2021, 15:51
by Jan
Hi, can I see the site where this occurs? To see the error in Javascript console, from which part it exactlycomes?

Jan

Re: Module error Using $ this when not in object context

Posted: 01 Aug 2021, 15:09
by Primorsky
Jan wrote: 28 Jul 2021, 15:51 Hi, can I see the site where this occurs? To see the error in Javascript console, from which part it exactlycomes?

Jan
Hi,
Sitename is shown in my first message : /home/inst642127/123rent.ru/docs/modules/mod_phocapanorama/mod_phocapanorama.php:47

Actually it is www.123rent.ru

Re: Module error Using $ this when not in object context

Posted: 05 Aug 2021, 16:37
by Jan
Hi, try to open the file and edit following lines

FROM:

Code: Select all

$this->t['panoramapathrel']			= $path['rel'];
    $this->t['panoramapathabs']			= $path['abs'];
TO:

Code: Select all

$p['panoramapathrel']			= $path['rel'];
    $p['panoramapathabs']			= $path['abs'];
And let me know if it is OK?

Jan

Re: Module error Using $ this when not in object context

Posted: 07 Aug 2021, 15:50
by Primorsky
Jan wrote: 05 Aug 2021, 16:37 Hi, try to open the file and edit following lines

FROM:

Code: Select all

$this->t['panoramapathrel']			= $path['rel'];
    $this->t['panoramapathabs']			= $path['abs'];
TO:

Code: Select all

$p['panoramapathrel']			= $path['rel'];
    $p['panoramapathabs']			= $path['abs'];
And let me know if it is OK?

Jan
Jan, thank you very much! Now it's working!

Re: Module error Using $ this when not in object context

Posted: 12 Aug 2021, 23:11
by Jan
Ok, great to hear it, I will add these changes to next version.

Jan