| Author |
Message |
|
Written on: 04. 08. 2011 [16:32]
|
|
philorkill
Philippe
Topic creator
registered since: 04.08.2011
Posts: 1
|
Magento admin panel in Typo 3 works only when the session is initialised the first time!
In all other cases, the admin panel shows this Error:
Fatal error: Mage_Admin_Model_Session::isLoggedIn() [<a href='mage-admin-model-session.isloggedin'>mage-admin-model-session.isloggedin</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Mage_Admin_Model_User" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in C:\xampp\htdocs\magento\app\code\core\Mage\Admin\Model\Session.php on line 185
I only tried this on my local installation on localhost.
Magento V. 1.4.2
Typo 3 V. 4.5.4
Any suggestions?
[This article was edited 2 times, at last 04.08.2011 at 16:34.]
|
|
Written on: 27. 08. 2011 [19:25]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
Hi,
I've got nearly the same problem additionaly in the TYPO3 FE:
Fatal error: Mage_Core_Model_Session_Abstract::getMessages() [mage-core-model-session-abstract.getmessages]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Mage_Core_Model_Message_Collection" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /.../magento/app/code/core/Mage/Core/Model/Session/Abstract.php on line 215
This happens on a fully working installation with TYPO3 4.5.2, Magento 1.6.0.0 an TypoGento 1.0.2 after updating TYPO3 to 4.5.5. My first thought was it might be a problem with session_start which is called in TYPO3 before fb_magento calls the Magento files. My current knowledge is, that unserialize requieres the appropiate class definition, which must be loaded before sessions_start is called. But I'm not sure because:
* I don't find any session_start call in TYPO3 with a simple text search for 'session_start', but in Magento it doesn't get called too because $_SESSION ist already set,
* using ini_set('unserialize_callback_func', array(&$this, 'autload')) or __autoload on different places doesn't help.
On the other side:
* Putting an awkward require_once('/.../magento/app/code/core/Mage/Core/Model/Message/Collection.php') into the begining of index.php of TYPO3 fix this one exception case,
* and the same statement only in magento/app/code/core/Mage/Core/Model/Session/Abstract.php or in tx_fbmagento_interface is too late and doesn't fix it.
I think there has "something" changed in TYPO3 and called before the fb_magento plugin and Magento so that the autoload workings crashes the system.
Greets
[Update] One possible reason could be unwanted outputs in TYPO3 or one of its subsystems before Magento gets started? But what is the best way to find them? I've checked the problem on to different server systems one with fresh installs of Magento 1.6.0.0, TYPO3 4.5.5 and TypoGento 1.0.2 and another one with a fresh Magento 1.6.0.0 and TypoGento 1.0.2, and an older TYPO3 4.5.2. On the first system the exception above was from th start present, and on the second system - which was completly working - with the update to TYPO3 4.5.5.
[This article was edited 1 times, at last 27.08.2011 at 19:40.]
|
|
Written on: 27. 08. 2011 [21:46]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
Hi,
I found out that the exception in the TYPO3 FE is caused by t3lib/class.t3lib_userauth.php line 256, which comes with revision e783aa69 (http://forge.typo3.org/projects/typo3v4-core/repository/revisions/e783aa69a7f48d971e87094fe825219cbd67f08c) putting session_start() from t3lib_userAuth::compareUident() to t3lib_userAuth::start().
So I think we need a way to inject the autoloader workings in tx_fbmagento_interface before t3lib_userAuth::start() get calls. But I dont know TYPO3 well enough to choose the right way e.g. TS to do this for FE and BE. Any ideas, hints ... or whatever?
Greets
|
|
Written on: 28. 08. 2011 [02:24]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
So, I've created a small solution for this problem here, just using XCLASS in a seperate extension. But currently only for the TYPO3 FE and without checking, if loading Magento is necessary on the current FE page. I think if no updates will come in the next weeks for that, I've to complete this patch extension.
Anyway, if anybody is interested in this, just let me know and I will make it public for all.
Greets
[This article was edited 2 times, at last 28.08.2011 at 02:27.]
|
|
Written on: 02. 09. 2011 [14:15]
|
|
it_hk
Boris
registered since: 02.09.2011
Posts: 4
|
Hi Artus!
Thx a lot for your bug analysis.
I have got the same error in Typo3 4.5.5.
I have downgraded now to 4.5.3: It works there without these errors.
I am interested in your patch also, but for our client it is important, that it works for FE as well as for Magento-BE as module in Typo3 (MAGENTO SHOP -> Admin).
Boris
[This article was edited 1 times, at last 02.09.2011 at 14:18.]
|
|
Written on: 06. 09. 2011 [19:16]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
Hi Boris,
currently I've got not enough time for fixing the backend issue. Therefor maybe you have to find the right place (HOOK or XCLASS) before start_session is called from TYPO3 and initialize the patch class ux_tx_fbmagento_interface like I do in ux_tslib_feUserAuth::start for the frontend.
Hope it helps
ps: I have to check the possibilities to build up more complex products (bundle vs. configurable) with Magento for my customer. Maybe you got some experience with this module (http://store.classyllama.com/configurable-bundle-module)?
pps: Please don't get confused about the named author in this patch; I don't like to post my full name in any forums for reasons of my privacy.
[This article was edited 2 times, at last 06.09.2011 at 19:37.]
Attachment
fb_magento_ext.zip (File type: application/x-zip-compressed, Size: 7.74 kilobytes) — 45 downloads
|
|
Written on: 09. 09. 2011 [13:44]
|
|
frederic.gaus
Frederic
registered since: 09.09.2011
Posts: 3
|
Hello,
we tried to fix the error with TYPO3 >4.5.4. There is a new version of the fb_magento TYPO3-Extension in
https://github.com/Flagbit/TypoGento
Branch: beta
Would someone be so kind and test this version. Hopefully we can push a new Version of TypoGento soon. It will only work with TYPO3 > 4.3
Best,
Frederic
|
|
Written on: 09. 09. 2011 [17:00]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
Hi Frederic,
I've got here an TYPO3 4.5.5 and Magento 1.6.0.0. Is it necessary with your beta release to update the Magento side also?
Greets
|
|
Written on: 09. 09. 2011 [17:10]
|
|
frederic.gaus
Frederic
registered since: 09.09.2011
Posts: 3
|
Hello Artus,
we have not yet tried TypoGento with Magento 1.6.0. The newest version we are using is 1.4.0. The beta-release has no changes on Magento side, so I guess you don't have to change something.
What is your experience with Magento > 1.6.0?
Best,
Frederic
|
|
Written on: 09. 09. 2011 [17:24]
|
|
artus
Artus
registered since: 25.08.2011
Posts: 14
|
With Magento 1.6 it works perfekt as yet! Currently we are working just on a prototype for our customer, and fight threfore with a little bit more complexity put into the product catalog of Magento . So we have not fully tested TypoGento but we are optimistic. And the response time is' about 700ms (without css, images etc.). Customer registration works without any problem. Only some links in the frontend are broken, but we haven't checked them yet. Magento 1.6 in common conveys very stable, with less added features and more bug fixes.
So we will definitely test your release and I post back the results here! I think this will happens next week.
Thank you very much!
[This article was edited 3 times, at last 09.09.2011 at 17:36.]
|