Closed JBoye closed 8 years ago
Complete project: http://upload.lindberg.pro/9wqpn/umbracocms730-beta3.zip - backoffice user: user: admin pass: test
Thanks, I'll look into this, I think tomorrow :-)
I've had a look at it and the null reference is umbracoContext here, even though you're "ensuring" the context (which made Shannon nervous when I asked him about it). But it's out of my league to debug fully.
Hmm, @nul800sebastiaan you looking into this issue, does that mean you're having the same issue on our umbraco?
Nope, I only have one domain set on Our. Just looking to see what we broke in Umbraco (if anything).
So it seems UmbracoContext.Application is null, which is weird because ApplicationContext.Current is set and usable. Seems like a breaking change in Umbraco and maybe even a bug? What do you think @nul800sebastiaan ?
Just to confirm, @nul800sebastiaan's PR fixes the issue for me
hi - will this be released soon? :D
I'll test again Friday and hopefully release an update! Apologies for the delay!
no worries. thanks!
hi - is there any scheduled release in mind yet? thanks
Yes, I fixed it today and will release an update tomorrow.
Just released 3.10-rc. I need some help testing it before marking it as stable. It's available on NuGet: https://www.nuget.org/packages/UrlTracker/3.10.0-rc
Please help me test this :-)
Just tested it on my 7.3.0 and seems to work just fine. I have created manually and from 404 view. Both 301 and 302. Regex is like Greek to me, so I have not tested that. Force redirect works. Querystring works. Great job :+1:
Thanks @engern for testing and creating an account just for this comment ;-)
Haven't had time to test, just one scenario I just thought of: does it handle .html
? So say your old said had some html files you want to redirect, does that work properly with this version?
Dammit! It doesn't :-( Now I remember why I used an HttpModule... So now what?
Ps. Thanks for the heads-up, didn't think about that scenario.
Yeah, I just realized that contentfinders don't handle "static" files. I'll have a chat with Shannon to see what else we can do.
Please do, I'm out of options.
I'm looking into this issue also. In 7.3.1 UmbracoContext.Security is still disposed on EndRequest. This causes UmbracoContext.Current.UrlProvider.GetUrl() to throw an exception. The problem is that it doesn't seem possible to catch certain requests (mainly for static files) on any other event than EndRequest. At least not after that Umbraco has handled the request. I've tried PostReleaseRequestState and UpdateRequestCache and neither fires.
So, you were right @kipusoep - the response.End()
in PublishedContentNotFoundHandler
causes the PostRequestHandlerExecute
event to not be fired. We'll remove it for 7.3.2.
Question is though.. how were you ever handling .html
(etc.) files before? We don't create an Umbraco context for static files so I'm not sure how that worked before.
So: for non-static files you can use PostRequestHandlerExecute
in 7.3.2 and the GetUrl call should succeed.
For static files you'd still subscribe to the EndRequest
event and do what you did before I guess? I just don't know how you managed to get a Url from this before.
@nul800sebastiaan I know a few things about HttpModules and Response.End() etc. ;-)
An HttpModule gets executed for every request, also for .html requests, so that's how I handle them, easy as that :-)
Sorry didn't read that correctly. I don't know why Umbraco stuff is working for .html requests, it just does ;-)
So back to an HttpModule it is, glad this is being fixed in 7.3.2!
You can give it a go with the latest nightly (build 110): http://nightly.umbraco.org/?container=umbraco-730
kinda need this fix or we cant upgrade to 7.3.1. Is there any update to this?
@avatart0ph You can use the RC which works with 7.3.0 and 7.3.1. The only issue is with non-asp.net URL's, like .html and .php. For 7.3.2 I'll have to create a new release.
@kipusoep can I clarify, for users on 7.1 if I download the latest source and compile, the non-asp.net URLs will be working? I normally download the source and edit the info page/tabs (with text and internal links that editors can read further) instead of installing from the package. Would appreciate if you can clarify.
For 7.1 you don't need the RC, just go for 3.9 :-)
Thanks!
@kipusoep thank you. unfortunately, we will have to wait for 7.3.2 >_< already skipped 7.3.0 and now this version cause we need your plugin to work.
We're not perfect, sometimes we accidentally break things (like this) and then we try hard to come up with a solution (like for this problem). :-)
It's hard, if not impossible, to think of all possible consequences with every code change. So cut them some slack please :-)
@nul800sebastiaan @kipusoep I apologize. no one is perfect. its just hard being the 'man in the middle' and i cant control some things. i love umbraco and have just started contributing to other projects (if i have tested it in a working environment and no issues from client for months). I guess umbraco just needs some sort of control to the plugins?
We're all part of this community and everybody needs to help by fixing 3rd party plug-in issues and umbraco issues, that's the great thing about open-source software :-) As I said; you can use the UrlTracker RC for Umbraco 7.3.0 and 7.3.1, automatic redirects will still work, just not .html/.php requests. But maybe you do have redirects for those extensions?
@kipusoep yeah i do. php and html. lol.:)
Ah, I'm sorry about that. Then you'll just have to wait for 7.3.2, can't take long I guess. Do you have a planned release date @nul800sebastiaan? So I can have a working and tested release ready before the release?
Ok so it seems 7.3.2 is release just now. I'm sorry, but I don't have an update UrlTracker release yet. Hopefully tomorrow.
Ah sorry, forgot to update this ! We weren't quite sure if we would be able to release this week :-)
I just tested the new PostRequestHandlerExecute with Umbraco 7.3.2, but it's not getting executed when I request "/test.html". EndRequest is getting executed though. I'm just not sure why this is happening. :-(
Fuuuuuuuu: Occurs when the ASP.NET event handler (for example, a page or an XML Web service) finishes execution.
Yeps, that's what I was trying to say here, you'll need to use both:
So: for non-static files you can use PostRequestHandlerExecute in 7.3.2 and the GetUrl call should succeed. For static files you'd still subscribe to the EndRequest event and do what you did before I guess? I just don't know how you managed to get a Url from this before.
It seems I don't have to change a thing; just using EndRequest works again like it used to, so 3.9 will just work :-)
Ah yes.. I think that should work! :-)
I tried to upgrade Umbraco to 7.3.2 and downgraded Url tracker to 3.9, but now I'm getting these again on a 404 request:
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Web.Routing.DefaultUrlProvider.GetUrl(UmbracoContext umbracoContext, Int32 id, Uri current, UrlProviderMode mode) +262
Umbraco.Web.Routing.<>cDisplayClass3.2.MoveNext() +109 System.Linq.Enumerable.FirstOrDefault(IEnumerable
1 source, Func`2 predicate) +121
Umbraco.Web.Routing.UrlProvider.GetUrl(Int32 id, Uri current, UrlProviderMode mode) +259
InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.UrlTrackerDo(String callingEventName, Boolean ignoreHttpStatusCode) in d:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:178
InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.context_EndRequest(Object sender, EventArgs e) in d:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:81
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +97
Reproduced in 7.3.2 + Url Tracker 3.9:
http://upload.lindberg.pro/8g7il/732.zip user: admin pass: testtest
Yeah me too, I thought it worked but it doesn't :-( So the question is; what changed in Umbraco 7.3 that kills the UrlTracker's ability to get a Node's url in the EndRequest handler?
We are getting this error under these circumstances in a load balanced (new method) environment on 7.3.3:
Go to a non-existant page which should give a nice 404 page on a sub directory on the LB domain.
If the page is accessed directly on each of the web servers it's fine. If it's accessed in the root it's fine. e.g.
http://www.loadbalanced.com/xxx/page-does-not-exist - 404 page does not work http://www.loadbalanced.com/page-does-not-exist - 404 page works
http://www.web1.com/xxx/page-does-not-exist - 404 page works http://www.web2.com/xxx/page-does-not-exist - 404 page works http://www.web1.com/xxx/page-does-not-exist - 404 page works http://www.web2.com/xxx/page-does-not-exist - 404 page works
hi - what is the current status of this ticket? The main umbraco use-case of redirecting an old node url to its new url doesn't work for me on 7.3.2 and urlTracker 3.9
Is there any more info and/or testing I can help with?
I don't know what to do. @nul800sebastiaan said to me on Twitter:
Haven't had any time mate, sorry! @Shazwazza is on holiday. I'll look when I get a chance.
I appreciate you are busy but because your package is so good it's also essential for anyone wanting to upgrade to 7.3 - it really should be part of the core IMHO. I think we'd all be very happy if it was made compatible with 7.3
I get the following exception on all 404 pages. It can be reproduced by installing a clean 7.3 Beta 3, and create multiple root nodes