Module error Using $ this when not in object context

Phoca Panorama - displaying list of panorama images and detail of selected panorama image
Primorsky
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Jul 2021, 09:05

Module error Using $ this when not in object context

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, can I see the site where this occurs? To see the error in Javascript console, from which part it exactlycomes?

Jan
If you find Phoca extensions useful, please support the project
Primorsky
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Jul 2021, 09:05

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

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Primorsky
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Jul 2021, 09:05

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

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Ok, great to hear it, I will add these changes to next version.

Jan
If you find Phoca extensions useful, please support the project
Post Reply