webdevops / TYPO3-metaseo

TYPO3 MetaSEO Extension
https://typo3.org/extensions/repository/view/metaseo
GNU General Public License v3.0
38 stars 25 forks source link

No Typoscript template found! error with cronjob task „Sitemap.xml builder“ #226

Closed kjeldschumacher closed 7 years ago

kjeldschumacher commented 8 years ago

With TYPO3 7.6.4, 2.0.0 metaseo and composer mode using the cronjob task „Sitemap.xml builder“ I am getting the error No Typoscript template found.

I checked it twice that the static template is included. Looking at the include settings and template analyzer.

thomaszbz commented 8 years ago

Tried to reproduce this with TYPO3 7.6.4, metaseo 2.0.0, realurl installed:

For me, running "Sitemap.xml builder" task manually gave me a success flash message and successfully created a sitemap:

uploads/tx_metaseo/sitemap_xml# ls -lh
total 8.0K
-rw-r--r-- 1 www-data www-data 225 Mar 12 23:20 index-r1.xml.gz
-rw-r--r-- 1 www-data www-data 316 Mar 12 23:20 sitemap-r1-p0.xml.gz

Where excactly can you see the error No Typoscript template found? Are you running it automatically via cron job?

Please also make sure to have cleared all caches.

thomaszbz commented 8 years ago

@kjeldschumacher Could you solve it?

kjeldschumacher commented 8 years ago

Hey, no still the same error. Will try to find the time during my holiday to debug it further.

thomaszbz commented 8 years ago

For the moment, it looks like a configuration issue. Please have a look at http://mjnext.com/blog/2012/07/16/typo3-no-typoscript-template-found/ and similar pages. You'll find a lot about it.

Besides TypoScript configuration, please also make sure that a root page is properly set in page properties.

thomaszbz commented 8 years ago

@kjeldschumacher what happens if you disable metaseo-extension temporarily via extension manager?

albert-spangler commented 8 years ago

i have the same problem: "Die Ausführung von Task "Sitemap.xml builder (metaseo)" ist fehlgeschlagen mit folgender Meldung: No TypoScript template found!"

thomaszbz commented 8 years ago

@albert-spangler Which versions of metaseo, TYPO3 and PHP are you using?

albert-spangler commented 8 years ago

typo3 7.6.3 metaseo 2.0.0 beta PHP 5.5.9

thomaszbz commented 8 years ago

Great. Your versions should work according to the tests I made. Did you upgrade metaseo or TYPO3 recently?

Please make sure that you clear all caches after the upgrade multiple times in different order. Please include cache and opcode in TYPO3's install tool as well as the orange system cache button which can be enabled via the install tool. Please make sure that you play around with clearing caches multiple times. I experienced that this really can help sometimes.

Do you have an opcode/PHP cache enabled on your system? Are multiple of these caches enabled/installed (e.g. xcache and apc)? What does the install tool report about PHP caches?

@albert-spangler Please update to latest version of TYPO3 (7.6.9+).

Please report back if one of the steps helped. If not, we need to further track it down. I'd also like to hear from @kjeldschumacher if he got this problem solved somehow.

thomaszbz commented 8 years ago

@albert-spangler Is this still an issue?

thomaszbz commented 7 years ago

@kjeldschumacher @albert-spangler As far as I can see, both of you used very early versions of TYPO3 7.6. Does this still happen with recent versions of MetaSEO and TYPO3?

Please try with MetaSEO 2.0.1+ and TYPO3 7.6.11+

thomaszbz commented 7 years ago

Seems to be an old phenomenon: https://forge.typo3.org/issues/53074

That said, I'm pretty sure that this issue is about configuration. Please make sure that you have statically included metaseo's template:

auswahl_075

That's documented and there also is a nice video tutorial.

After that, please make sure to clear caches using the install tool, including opcode cache. I have seen cases in which I had to do this multiple times.

@kjeldschumacher are you also using composer mode?

thomaszbz commented 7 years ago

Also tried a fresh install in composer mode with this composer.json:

{
  "repositories": [
    { "type": "composer", "url": "https://composer.typo3.org/" }
  ],
  "name": "my-vendor/my-typo3",
  "require": {
    "typo3/cms": "^7.6",
    "typo3-ter/metaseo": "^2.0"
  },
  "extra": {
    "typo3/cms": {
      "cms-package-dir": "{$vendor-dir}/typo3/cms",
      "web-dir": "web"
    }
  }
}

followed by a composer update -o

After that, I created a page, added metaseo's static template and ran the task to create the xml sitemap. Everything worked great (PHP 5.6, TYPO3 7.6.14 in composer mode, metaseo 2.0.1):

/var/www/typo3_composer/web/uploads/tx_metaseo/sitemap_xml# ls -l
-rw-r--r-- 1 www-data www-data 228 Dec 11 12:19 index-r1.xml.gz
-rw-r--r-- 1 www-data www-data 248 Dec 11 12:19 sitemap-r1-p0.xml.gz

Same for Sitemap.txt task:

/var/www/typo3_composer/web/uploads/tx_metaseo/sitemap_txt# ls -la
-rw-r--r-- 1 www-data www-data 63 Dec 11 12:46 sitemap-r1.txt.gz

For testing, I used this docker file for TYPO3, just with composer mode enabled.

Now that everything works, I'm closing this issue. If someone else has these issues with correct configuration and recent versions of TYPO3 and metaseo, please file a new issue and reference to this one.

@kjeldschumacher @albert-spangler I can reopen this issue if you can further track it down and there's a reason to bugfix something.