Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility contao 3.3.0 ? #2

Open
conBlow opened this issue Sep 19, 2014 · 14 comments
Open

Compatibility contao 3.3.0 ? #2

conBlow opened this issue Sep 19, 2014 · 14 comments

Comments

@conBlow
Copy link

conBlow commented Sep 19, 2014

We installed Geoprotection+ Geolocation+ Ajax+ httprequestextended+ MultiColumnWizard and everything was looking pretty good, we had the extra settings on every site and article and they were configurable.
But after a short time we were facing problems in the backend, which could be happening because of an incompatibility of Contao 3.3.0 with the current version of Geoprotection. Or could it probably be another extension ,which was already installed by us, blocking the functions of geo-protection/location and causing problems ? Did someone have the same problem and already found the solution ?

thank you for your assistance.

@davidmaack
Copy link
Member

Which versions of the mentioned extensions did you use? And could you specify "problems" a bit more in detail? :)

@conBlow
Copy link
Author

conBlow commented Sep 22, 2014

We installed the newest versions via the extensioncatalog in contao. Firstly it didnt really work out because if we for example hided a part of the website only for germany it was not visible for any country at all, and of course it didnt work the other way around. Secondly it somehow began to cause huge bugs in the backend by logging in with the user, who last changed the geolocation/geoprotection settings.
The error logs also appeared on the front end. I think all error logs which were shown were caused by the extension package we installed.
For example:
Warning: The deserialize() function does not allow serialized objects in system/helper/functions.php on line 309

#0 [internal function]: __error(512, 'The deserialize...', '/kunden/88635_7...', 309, Array)
#1 system/helper/functions.php(309): trigger_error('The deserialize...', 512)
#2 system/modules/core/classes/BackendUser.php(389): deserialize('a:6:{s:7:"refer...')
#3 system/modules/core/library/Contao/User.php(209): Contao\BackendUser->setUserFromDb()
#4 system/modules/core/classes/BackendUser.php(216): Contao\User->authenticate()
#5 contao/main.php(59): Contao\BackendUser->authenticate()
#6 contao/main.php(292): Main->__construct()
#7 {main}

Warning: Cannot modify header information - headers already sent by (output started at /kunden/88635_71272/contao2/system/helper/functions.php:70) in system/modules/core/library/Contao/System.php on line 524

#0 [internal function]: __error(2, 'Cannot modify h...', '/kunden/88635_7...', 524, Array)
#1 system/modules/core/library/Contao/System.php(524): setcookie('BE_USER_AUTH', '74e8323f5aa5b36...', 1411054202, '/', '', false, true)
#2 system/modules/core/library/Contao/User.php(215): Contao\System::setCookie('BE_USER_AUTH', '74e8323f5aa5b36...', 1411054202, NULL, NULL, false, true)
#3 system/modules/core/classes/BackendUser.php(216): Contao\User->authenticate()
#4 contao/main.php(59): Contao\BackendUser->authenticate()
#5 contao/main.php(292): Main->__construct()
#6 {main}

Warning: Cannot modify header information - headers already sent by (output started at /kunden/88635_71272/contao2/system/helper/functions.php:70) in system/modules/core/library/Contao/Template.php on line 261

#0 [internal function]: __error(2, 'Cannot modify h...', '/kunden/88635_7...', 261, Array)
#1 system/modules/core/library/Contao/Template.php(261): header('Vary: User-Agen...', false)
#2 system/modules/core/classes/BackendTemplate.php(121): Contao\Template->output()
#3 contao/main.php(284): Contao\BackendTemplate->output()
#4 contao/main.php(146): Main->output()
#5 contao/main.php(293): Main->run()
#6 {main}

Warning: Cannot modify header information - headers already sent by (output started at /kunden/88635_71272/contao2/system/helper/functions.php:70) in system/modules/core/library/Contao/Template.php on line 262

#0 [internal function]: __error(2, 'Cannot modify h...', '/kunden/88635_7...', 262, Array)
#1 system/modules/core/library/Contao/Template.php(262): header('Content-Type: t...')
#2 system/modules/core/classes/BackendTemplate.php(121): Contao\Template->output()
#3 contao/main.php(284): Contao\BackendTemplate->output()
#4 contao/main.php(146): Main->output()
#5 contao/main.php(293): Main->run()
#6 {main}

@conBlow
Copy link
Author

conBlow commented Sep 29, 2014

Hi David,
have you already been able to take a look at our problem?
T

@davidmaack
Copy link
Member

hi,

just took a quick look at it. I can´t reproduce your Problem on my 3.3.5 testinstallation, but I´m pretty sure your problem is not geoprotection, but geolocation. The version available in the ER is a bit outdated and still tries to store the session data as an object - this behaviour is forbidden by the contao core for security reasons and that is exactly the error message you posted.

Can you try installing the lates version from github? https://github.com/menatwork/geolocation/
Also download the latest version of geoprotection, just to be in the save side. As far as I remeber, there was an API-change in the last geolocation update and I had to adust geoprotectio as well.

Geolocation also depends on the ajax-extension from terminal42, which is not working for Contao 3.3.X and it´s development is discontinued. So if you need the FE-Modules of this extension you might need to patch the ajax.php... :)

@conBlow
Copy link
Author

conBlow commented Sep 29, 2014

Do we need composer for the installation or is this done manually?

@davidmaack
Copy link
Member

You can install the lates version via composer, or just donwload the ZIP-files from github if you want to install it manually. Both ways should work.

@conBlow
Copy link
Author

conBlow commented Sep 29, 2014

Ok, we installed it manually andinstalled the other extensions with the extension repository. We don't have any failure notices yet. That's good.
We made a test site where one content element is visible for Germany. We didin't make any changes in the system settings but we reduced the cache time for this page to 30 seconds.
W3C-Lokalisierung, IP-Lokalisierung and Fallback are activated for this page.
The results are:

  • MS Windows 7 Desktop Protection does not work on included articles #1
    · Firefox works: content element is shown after location access authorisation; also foreign proxy servers checked: content element not shown
    · Chrome: content element is not show after location access authorisation --> bad; also foreign proxy servers checked: content element not shown --> good
    · IE --> same behaviour like Chrome
  • MS Windows 7 Desktop Compatibility contao 3.3.0 ? #2
    · Firefox does not show the element
    · IE same behaviour
  • MS Windows 7 Desktop #3
    · Chrome does not show the element
    · IE same behaviour
  • Android Smartphone Protection does not work on included articles #1
    · Chrome: content element is shown after location access authorisation
    · Android Webkit: content element is shown after location access authorisation
  • Android Smartphone Compatibility contao 3.3.0 ? #2
    · Chrome: content element is shown after location access authorisation
    · Android Webkit: content element is shown after location access authorisation
  • Android Smartphone #3
    · Chrome: content element is not shown after location access authorisation
    · Android Webkit: content element is shown after location access authorisation

Do you have an idea what the problem is?

Thank you

@davidmaack
Copy link
Member

My guess is that the W3C-Localization is not working properly. Geolocation will send the information to the Server unsing AJAX, but the Ajax-Extenion won´t work for Contao 3.3.x. I haven´t tested this yet, but I´m very sure, that this is your Problem.

When yo take a look at your browsers console (usually F12 and then klick on "network"), you will see the ajax-request and you will probably get an error as the return value.

You should try this: add var_dump($country) on line 35 in the geoprotecion.php? https://github.com/menatwork/geoprotection/blob/master/system/modules/z_geoprotection/Geoprotection.php#L35 This will output the current country of the user. I´m sure the country is tracked wrong...

@conBlow
Copy link
Author

conBlow commented Sep 30, 2014

Ok, we've checked if the error in network is shown but there was none. Did we use the correct tool – see screenshot? Shall we add the code line?
screenshot-netzwerkanalyse

@davidmaack
Copy link
Member

Hmm, my network tools looks a bit different (also using Firefox)
network

But anyway I still think, that the country is tracked wrong. So just add the var_dump mentioned above and see what country is tracked by the website.

@conBlow
Copy link
Author

conBlow commented Oct 1, 2014

Ok, when activate the Firefox developer tools the tool bar asks me to start a analysis
button
After that the circle diagram appears. When I clock on back (zurück) I get the same options as you. But the ajax.php file does not appear – see screenshot
screenshot-xhr
Did make a mistake?

@davidmaack
Copy link
Member

Hmm, interesting. But the website does ask you for tracking your location? This should usually trigger an Ajax-Request to send the gedata to the server...

Just add the var_dump() to the file mentioned above and take a look what country is being tracked.

@conBlow
Copy link
Author

conBlow commented Oct 2, 2014

Huh - I am not really experienced with php. Were exactly shall I add the snippet…
35 $country = ($objGeo->getCountryShort() != '') ? $objGeo->getCountryShort() : 'xx';

Sorry?

@davidmaack
Copy link
Member

Sry for the late reply, I was out of town fpr the long weekend :). Just add the code snippet var_dump($country); AFTER line 35 (the line you posted).

This should output the lang-code (stored in $country) which is getting tracked by the geolocation extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants