Open robertmclaws opened 11 years ago
I get an empty XML response in the browser as well. Have you selected anything to be indexed for the xml sitemap yet, or made any custom routes?
-Chris
On Mon, Jul 22, 2013 at 7:35 PM, AdvancedREI notifications@github.comwrote:
Hello,
I'm using your plug-in on Orchard 1.7RC on my site. I can access the sitemap.xml from a browser, but when I use Fiddler to ping it, or try to hit any other sitemap validating service, it returns a 200OK with no payload.
You can try it for yourself at http://advancedrei.com/sitemap.xml.
Any ideas?
Thanks!
-Robert McLaws
— Reply to this email directly or view it on GitHubhttps://github.com/webadvanced/Orchard-SiteMap/issues/13 .
I figured it out. The sitemap is not visible to the Anonymous role. The reason I could see it is that I was logged into the console and opened the sitemap up in another tab.
The Roles editor only has the option to enable sitemap editing in the Anonymous role... any idea how I make the sitemap visible when you're not logged in?
Any update on this? Thanks!
The module doesn't do any access checking at all outside of the admin screen. Being logged in shouldn't be required.
Our website's sitemap at http://www.webadvanced.com/sitemap.xml uses my module and works fine anonymously. If it was blocked, you would get an HTTP Unauthorized response or be redirected to the login screen. Are you sure you've gone to the sitemap settings and checked "Index for XML" next to the content types you want to show up?
On Sat, Jul 27, 2013 at 9:08 PM, AdvancedREI notifications@github.comwrote:
Any update on this? Thanks!
— Reply to this email directly or view it on GitHubhttps://github.com/webadvanced/Orchard-SiteMap/issues/13#issuecomment-21676905 .
Hi,
I'm having the same issue when installing the module in Orchard 1.7. The sitemap.xml file won't load for anonymous users, and I can't enable it in the Roles section.
I believe the problem has to do with an error happening in the code, and a blank document being passed in from the cache. The reason being that calling /sitemap throws a 500 error when you're not sharing anything with the sitemap display, and I also believe unpublished content might be a factor. I'm attempting to debug through it in my environment, but I'm running into other issues. Hope to have an update (and possibly a pull request) in a few hours.
I spent the better part of 3 days trying to track this down. I looked at every permutation I could, tried logging errors, and numerous other options. The only thing I could come up with is that I had "runManagedModulesForAllRequests" turned on in the web.config, which triggered some kind of security mechanism, I wasn't able to find out what. The XmlAction wrote the document, which was properly configured, but something further down the pipeline cleared the response buffer. The solution is to set it to false.
Would be nice if someone could figure out what caused this, but for now I'm going to call it a day.
HTH
Actually, I take it back. That did not fix it. I was still logged in. This is seriously driving me crazy.
Well, I appreciate the effort. I've been really busy with work for the last couple weeks (this isn't always the case) but I'll take a look at this when I can sometime soon.
No worries. I don't believe it is actually your fault. I stepped through the code and it should be working. Something happens to the Response in between your code and when it renders for an anonymous user. I suspected maybe you weren't closing the reader or flushing it, but I did those things and that didn't help. I'm pretty convinced it is an Orchard Core issue.
I have confirmed that the Core Feeds module is exhibiting the same problem. This is an issue introduced into the RC build, somehow, and seems to be affecting any action that outputs XML results.
The Orchard team has a bug open for a related issue here: https://orchard.codeplex.com/workitem/19963
It's confirmed now that disabling Output Cache will solve this issue. I'm going to hope this is fixed in 1.7.1.
Easy fix.
[OutputCache(Duration = 0, NoStore = true)]
public ActionResult Xml() {
return new XmlResult(_sitemapService.GetPublicSitemapDocument());
}
That's not a fix, it's a workaround, the module should work with output caching...
Hello,
I'm using your plug-in on Orchard 1.7RC on my site. I can access the sitemap.xml from a browser, but when I use Fiddler to ping it, or try to hit any other sitemap validating service, it returns a 200OK with no payload.
You can try it for yourself at http://advancedrei.com/sitemap.xml.
Any ideas?
Thanks!
-Robert McLaws