#2318 - Composr 10b4: Adding a news results in an error about missing sitemap file
| Identifier | #2318 |
|---|---|
| Issue type | Minor issue (breaks specific functionality) |
| Title | Composr 10b4: Adding a news results in an error about missing sitemap file |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | news |
| Description | PHP WARNING [2] fopen(data_custom/sitemaps/news_sitemap.xml) [<a href='http://php.net/manual/en/function.fopen.php'>function.fopen.php</a>]: failed to open stream: No such file or directory in sources/news_sitemap.php on line 32 (version: 10 beta4, PHP version: 5.4.16, URL: /cms/cms-news/_add?redirect=https%3A%3Aslash%3A%3Aslash%3Alovinity.org%3Aslash%3Astart&uploading=1) |
| Steps to reproduce | |
| Additional information | I don't remember ever deleting the sitemap. This issue has also existed in prior installations of Composr as well. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".
Comments
To be more specific, if I set the "validate news" at "off" I don't get this message.
Then if after creating the news, I validate it, I don't get this error
But if I try to create a news and leave the "Validate" at "On" then I get the error
Could you try this replacement for sources/news_sitemap.php:
https://raw.githubusercontent.com/ocproducts/composr/f5f67d0298c48a96df6636b1f4ee8951db39a7c5/sources/news_sitemap.php
It will fix a problem with shared-install support and also replace the directory if somehow it's gone missing.