Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

Sitemap...Task uses wrong path to write sitemap_txt and sitemap_xml #518

Open
tgaertner opened this issue Mar 20, 2018 · 5 comments
Open

Comments

@tgaertner
Copy link

MetaSEO version: *

TYPO3 version: *

PHP version: *

Don't get it, why could this ever worked...???

The Scheduler/Task/SitemapTxtTask.php and .../SitemapXmlTask.php create pathes like this:

PATH_site . '/' . $this->sitemapDir

PAH_site is by definition "Absolute path of the document root of the instance with trailing slash"
so the path will be always something like

path/to/webroot//uploads/tx_metaseo/sitemap_xml with 2 slashes!

I get axacly this error message in Scheduler Task
Ausführung fehlgeschlagen: 0, DirectoryIterator::__construct(/html/htdocs/web//uploads/tx_metaseo/sitemap_xml): failed to open dir: No such file or directory"

I checked the core back up to 6.2 - it has not changed
I checked metaseo extension coded - it has also not changed since all versions available on github.
So where is the mistake??

Normally I would say the part has to be changed to
PATH_site . $this->sitemapDir

Greetings Tobi

@tgaertner
Copy link
Author

I think it works most of the time because the underlaying environment does not care about double slashes - don't know if its PHP or the system in that case. I have the problem currently with PHP 7.1 but have not tested others jet.

Anyway, I think this should be fixed.

@tgaertner
Copy link
Author

I opend a pull request on this: #519

@tgaertner
Copy link
Author

tgaertner commented Mar 27, 2018

Well actually this was not the problem :-) The main Problem was that the upload folder is not created automatically + if I create it I get the error-msg "No TypoScript Template found" but ist included and all other stuff from the extension works - excapt the scheduler tasks to create real sitemaps. So this part is not working in version 3 jet. (My PullRequest could be applied anyway for it increases code-quality imo)

@thomaszbz
Copy link
Member

thomaszbz commented Mar 27, 2018

Is your PR supposed to fix the latter?

excapt the scheduler tasks to create real sitemaps. So this part is not working in version 3 jet.

Please give us exact version information: TYPO3, metaseo (I assume 3.0.0), PHP and realurl version

@tgaertner
Copy link
Author

TYPO3 8.7.10 / 8.7.12
metaseo 3.0.0
PHP 7.1.9

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

No branches or pull requests

2 participants