Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemaps not working on Orchard 1.7 RC #13

Open
robertmclaws opened this issue Jul 23, 2013 · 15 comments
Open

Sitemaps not working on Orchard 1.7 RC #13

robertmclaws opened this issue Jul 23, 2013 · 15 comments

Comments

@robertmclaws
Copy link

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

@CPyle
Copy link
Contributor

CPyle commented Jul 23, 2013

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 [email protected]:

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//issues/13
.

@robertmclaws
Copy link
Author

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?

@robertmclaws
Copy link
Author

Any update on this? Thanks!

@CPyle
Copy link
Contributor

CPyle commented Aug 1, 2013

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 [email protected]:

Any update on this? Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-21676905
.

@nicnicnic
Copy link

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.

@robertmclaws
Copy link
Author

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.

@robertmclaws
Copy link
Author

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

@robertmclaws
Copy link
Author

Actually, I take it back. That did not fix it. I was still logged in. This is seriously driving me crazy.

@CPyle
Copy link
Contributor

CPyle commented Aug 2, 2013

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.

@robertmclaws
Copy link
Author

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.

@CPyle
Copy link
Contributor

CPyle commented Aug 6, 2013

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.

@robertmclaws
Copy link
Author

The Orchard team has a bug open for a related issue here: https://orchard.codeplex.com/workitem/19963

@CPyle
Copy link
Contributor

CPyle commented Aug 6, 2013

It's confirmed now that disabling Output Cache will solve this issue. I'm going to hope this is fixed in 1.7.1.

@Jetski5822
Copy link

Easy fix.

    [OutputCache(Duration = 0, NoStore = true)]
    public ActionResult Xml() {
        return new XmlResult(_sitemapService.GetPublicSitemapDocument());
    }

@dsghi
Copy link

dsghi commented Mar 5, 2015

That's not a fix, it's a workaround, the module should work with output caching...

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

No branches or pull requests

5 participants