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.
Module error Using $ this when not in object context
-
- Phoca Newbie
- Posts: 3
- Joined: 28 Jul 2021, 09:05
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Module error Using $ this when not in object context
Hi, can I see the site where this occurs? To see the error in Javascript console, from which part it exactlycomes?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 28 Jul 2021, 09:05
Re: Module error Using $ this when not in object context
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
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Module error Using $ this when not in object context
Hi, try to open the file and edit following lines
FROM:
TO:
And let me know if it is OK?
Jan
FROM:
Code: Select all
$this->t['panoramapathrel'] = $path['rel'];
$this->t['panoramapathabs'] = $path['abs'];
Code: Select all
$p['panoramapathrel'] = $path['rel'];
$p['panoramapathabs'] = $path['abs'];
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 28 Jul 2021, 09:05
Re: Module error Using $ this when not in object context
Jan, thank you very much! Now it's working!Jan wrote: ↑05 Aug 2021, 16:37 Hi, try to open the file and edit following lines
FROM:TO:Code: Select all
$this->t['panoramapathrel'] = $path['rel']; $this->t['panoramapathabs'] = $path['abs'];
And let me know if it is OK?Code: Select all
$p['panoramapathrel'] = $path['rel']; $p['panoramapathabs'] = $path['abs'];
Jan
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Module error Using $ this when not in object context
Ok, great to hear it, I will add these changes to next version.
Jan
Jan
If you find Phoca extensions useful, please support the project