witrin / TypoGento

Integrating Magento with TYPO3.
15 stars 3 forks source link

static blocks in different languages #32

Closed denyo256 closed 11 years ago

denyo256 commented 11 years ago

I'm trying to include the top-links from Magento on every page with the following typoscript:

lib.shopheader < plugin.tx_typogento_pi1
lib.shopheader {
  block = top.links
}

This works fine in all languages as long as there is a Magento content element. On any other page, only the default language with the default store view is working, all other languages result in an error "Page not found".

Do you know any solutions for this?

witrin commented 11 years ago

Did you setup a default route respectively which setup did you use (config.tx_typogento.routes)? The latest Gist revision is unfortunately not free of bugs. The thing is, as long there is no content plugin, which sets the Magento action, you'll need a default Magento action like 'core/index/index' which should be rendered. Otherwise Typogento detects no response and throws the 404.

In addition, I am very sad that I can not publish the latest version of Typogento that supports beside Extbase and namespaces also a one-click setup, since I still lack the synchronization and authentication of accounts, and I can not find time to finish this off.

denyo256 commented 11 years ago

I used the routes from your latest Gist. What makes me wonder is the fact that it works well as long as I don't use an alternative language.

witrin commented 11 years ago

You mean that your described problem (404) doesn't appear as long as you don't use an alternative language?

denyo256 commented 11 years ago

Yes, the top-links appear in my default language on every page, even on those pages without a Magento content element. But switching to an alternative language results in an 404 error.

witrin commented 11 years ago

Please add echo 'Dispatch URL: ' . $this->_url; right after this line and post its output for a page, without a Magento content plugin, in the default language and in a non default language; maybe you have to disable the default error handler for this.

denyo256 commented 11 years ago

Output for default language: Dispatch URL: /cms/index/index/index/? Output for alternative language: Dispatch URL: /cms/index/index/index/?

witrin commented 11 years ago

I assume on both pages were no Magento content plugins and the first output went well! Did you setup the store view for the alternative language in the backend or with plugin.tx_typogento_pi1.storeName?

You see also that the latest Gist, you use for the dispatch, is unfortunately not correct. It should be /cms/index/index in the default case.

denyo256 commented 11 years ago

Exactly, there were no Magento content plugins and the first output went well. I set up store views for all alternative languages with plugin.tx_typogento_pi1.storeName.

I tried to correct my dispatch for testing, but unfortunately I wasn't successful.

witrin commented 11 years ago

You could try to comment out plugin.tx_typogento_pi1.storeName for the alternative languages to exclude that it's responsible for the 404. If this was the problem, you could try to setup the store name by using the backend; there is a dropdown within the language records to do that. Have you made any other settings of TypoGento for the alternative languages?

denyo256 commented 11 years ago

The dropdowns within the language records have all been set, so commenting out plugin.tx_typogento_pi1.storeName has no effect. If I set the dropdown to the default store view, the 404 is gone, but the Magento output is in default language (of course). No other TypoGento settings for the alternative languages have been made, only the storeName.

witrin commented 11 years ago

You don't need to set both, using language records only is enough. Did you test the other languages in the default Magento frontend respective is there a home page set for the other store views?

denyo256 commented 11 years ago

I tested them in the Magento frontend, but didn't have a homepage set. I now set the homepage for all store views and the 404 is gone. Great! Thank you very much for your help.

witrin commented 11 years ago

You're welcome!