Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 17:11
    Kevin R. Smith
    0

    UBlogsy not playing nice with URL rewriting?

    <unsolicited praise> I've installed and been using UBlogsy in our Umbraco implementation for our customer. It's super easy and has been working great! </unsolicited praise>

    Since we starting using URL rewriting, however, we've been running into errors when we publish a blog post AND when we comment on the blog. Here's the error when we publish from the CMS:

    ******************************************************************************************************************************

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentNullException: Value cannot be null.
    Parameter name: attribute

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [ArgumentNullException: Value cannot be null.
    Parameter name: attribute]
       System.Xml.Linq.XAttribute.op_Explicit(XAttribute attribute) +162326
       UmbracoExamine.UmbracoContentIndexer.ReIndexNode(XElement node, String type) +193
       Examine.ExamineManager._ReIndexNode(XElement node, String type, IEnumerable`1 providers) +93
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.UpdateDocumentCache(Document d) +1112
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +122
       uHelpsy.Core.UmbracoAPIHelper.UpdateContentNode(Document doc, Dictionary`2 properties, Boolean publish) +221
       uHelpsy.Core.UmbracoAPIHelper.CreateContentNode(String nodeName, String nodeTypeAlias, Dictionary`2 properties, Int32 parentId, Boolean publish) +206
       uBlogsy.Web.Extensions.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) in D:\_PROJECTS\uBlogsy\Branches\1.32_bugs_search\uBlogsy\uBlogsy\Extensions\UmbracoExtensions.cs:118
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +1578
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +414
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +187
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +165
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691

    *********************************************************************************************************************

    And here's the error when we post a comment on the client side:

    *********************************************************************************************************************

    Sequence contains no elements
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for

    more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: Sequence contains no elements

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and

    location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [InvalidOperationException: Sequence contains no elements]
       System.Linq.Enumerable.Single(IEnumerable`1 source) +379
       uBlogsy.Web.usercontrols.uBlogsy.Contact.CreateComment() in D:\_PROJECTS\uBlogsy\Branches\1.32_bugs_search\uBlogsy

    \uBlogsy\usercontrols\uBlogsy\Contact.ascx.cs:99
       uBlogsy.Web.usercontrols.uBlogsy.Contact.btnSubmit_Click(Object sender, EventArgs e) in D:\_PROJECTS\uBlogsy\Branches

    \1.32_bugs_search\uBlogsy\uBlogsy\usercontrols\uBlogsy\Contact.ascx.cs:60
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    +3691

    *********************************************************************************************************************

    Any insight would be helpful!

     

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 28, 2011 @ 18:56
    Anthony Dang
    0

    Hey Kevin

    I think the problem is with the comments folder.

    On publish of a post, a comments folder is created. If this does not exist then a comment will fail.

    I don't know what url rewriting would have to do with this though.

    What version of uBlogsy are you running?

    How many instances of the uBlogsy landing node are there?

    What does your content tree look like?

  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 22:16
    Kevin R. Smith
    0

  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 22:18
    Kevin R. Smith
    0

    As far as URL rewriting have an affect - you are correct, it has nothing to do with it since I tested that AFTER I posted - sorry! :-)

    I have 1.32 - could it be that 1.33 fixes this? If so, what's the best way to update my version without blowing out all of my content, templates, etc.

    We're just running one instance of UBlogsy in the site.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 28, 2011 @ 22:25
    Anthony Dang
    0

    Hmmm

    Can you confirm that the comments folder is created and that there is only one of them.

    Did you install any package that does anything on the before/after publish event?

    On second examination of your stack trace it seems that examine indexing is crashing. Try deleting your examine indexes.

    As far as upgrading, just copy the dll. Nothing else has changed. I'm not sure if it will fix your problem but give it a try.

     

     

  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 22:34
    Kevin R. Smith
    0

    I'm likely asking a question with an obvious answer but I'm still helplessly new at Umbraco. Any hint as to where the comments folder is created?

    The only other package installed is Full Text Search which I can't imagine is affecting anything...

    ...and last, where would I look for the examine indexes?

    Thanks for your help!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 28, 2011 @ 22:51
    Anthony Dang
    0

    Comments is not an acutal folder.

    Under the new blogpost node there should be a node called comments node created when you hit publish.

     

    Your examine indexes are in your app_data folder (on the file system). There are 2 examine folders. One under app_data, one under app_data/temp/.

    Delete the one under app_data/temp/

     

     

  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 23:11
    Kevin R. Smith
    0

    When I first create the post on the admin side, it'll create the page just fine (but no comment folder). As soon as I type content in the rte and publish, it errors out (see above).

     If I reload the nodes and go back into the newly created post, it publishes fine - and the comments folder is there when I publish.

    If I create a post and SAVE it doesn't error - as soon as I publish it, it throws the error. If I go back to that node and publish it again - it works!

     I deleted the examine indexes... still throwing the error.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 28, 2011 @ 23:31
    Anthony Dang
    0

    Hmm... Since it's crashing on re-indexing it sounds like somethign is out of wack with lucene/examine.

     

    Try the following in exact order:

    1. Stop your site, then delete your entire app_data/temp folder
    2. Bump your config (add a space to the end of the web.config and save)
    3. Restart IIS (or casini).
    4. Log into umbraco
    5. Republish from your root content node (publish all) - not the one that is called Content...the one directly under that

     

    If that doesnt work...pelase answer the following...

    What versions of umbraco and examine are you using?

    Is this happening on localhost?

    Are you running it on IIS or casini?

     

     

  • Kevin R. Smith 26 posts 48 karma points
    Jul 28, 2011 @ 23:57
    Kevin R. Smith
    0

    As far as the comment node being created - it appears to be (after it successfully publishes - see above).

    I followed your instructions above and it is still erroring when I publish the first time.

    1. Umbraco v4.7
    2. Not sure how to determine Examine
    3. This is on a staging server: Server 2008 running IIS7, .Net v4

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 29, 2011 @ 00:32
    Anthony Dang
    0

    Oh I missed some steps out of the last instructions...

     

     

    Try the following in exact order:

    1. Stop your site, then delete your entire app_data/temp folder
    2. Delete  /app_data/umbraco.config
    4. Make sure that NOTHING in /app_data/ is read-only 
    5. Bump your config (add a space to the end of the web.config and save)
    6. Restart IIS (or casini).
    7. Log into umbraco
    8. Republish from your root content node (publish all) - not the one that is called Content...the one directly under that

    This basically covers all bases for 90% of umbraco publishing problems.

    *fingers crossed*

     

     

  • Toni Becker 146 posts 425 karma points
    Jul 29, 2011 @ 06:34
    Toni Becker
    0

    Hmhmhm. Republish should do the trick, if not.

    Check your folder permissions, stop isapi rewrite engine, check your urlrewritingnet configSource="config\UrlRewriting.config", choose umbracoUseDirectoryUrls" value="false" to true in your web.config and test this out. if this works than you could assume that it's something related to your rewrite settings.

  • Kevin R. Smith 26 posts 48 karma points
    Jul 29, 2011 @ 15:48
    Kevin R. Smith
    0

    Thanks Toni, we've already determined that URL re-writing wasn't the culprit here... it happens to be a publishing problem. :-)

    Sorry for the misleading title!

     

  • Kevin R. Smith 26 posts 48 karma points
    Jul 29, 2011 @ 15:49
    Kevin R. Smith
    0

    I've tried the 8 step program with no success. :-(

    Something new is happening, however, when I follow your steps - it's now erroring when I publish the node and sub-pages.

    I'll post the error I'm getting next...

  • Kevin R. Smith 26 posts 48 karma points
    Jul 29, 2011 @ 16:03
    Kevin R. Smith
    0

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Request timed out.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [HttpException (0x80004005): Request timed out.]
    

     


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 29, 2011 @ 21:25
    Anthony Dang
    0

    hmmm...request timeout. That is something entirely different.

    Are you on a load balanced environment?

  • Kevin R. Smith 26 posts 48 karma points
    Jul 29, 2011 @ 23:53
    Kevin R. Smith
    0

    Single server... no load balancing. Could you give me some guidence on updating the dll? Maybe we could try that?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Aug 17, 2011 @ 21:49
    Anthony Dang
    0

    Hey Kevin did you ever resolve this issue?

     

     

     

  • Kevin R. Smith 26 posts 48 karma points
    Aug 17, 2011 @ 22:27
    Kevin R. Smith
    0

    Not yet. I've got some more information that may be helpful. I need to pull it together and I'll post it shortly.

  • suzyb 474 posts 932 karma points
    Aug 19, 2011 @ 20:33
    suzyb
    0

    Hi, we had the same ysod on our site which my colleague managed to fix.

    Posted the solution here http://our.umbraco.org/projects/starter-kits/ublogsy/ublogsy-bugs/23212-Error-when-publishing-posts

  • Byron Maas 4 posts 24 karma points
    Jan 14, 2012 @ 17:13
    Byron Maas
    0

    New insight on this problem.

    The blog was installed and located at: www.example.com/company-blog/blog
    So posts would look like: www.example.com/company-blog/blog/2012/01/post-name

    It was requested to clean/tidy up the url by removing  "company-blog" so it would be: www.example.com/blog/2012/01/post-name 
    How this was done (and how to undo it) is not clear. It's not invisible redirects. It's not an ISAPI_Rewrite in .htaccess. As best as it can be remembered it was something in an umbraco.config file.

    Now as far as publishing. When you draft something (anything) in Umbraco it'll say "This item is not published" under the properties. When you publish an item it'll create the url written out (/blog/2012/01/post-name) as a link to the live page. In the problem mentioned that started this tread when you attempt to publish a blog post it causes a server error, it does save it so you can reload it, even though it is not published the text "This item is not published" is now a hashtag "#" with a link to www.example.com/umbraco/editContent.aspx?id=1234#

    The second attempt to publish will publish the post, however the comment "folder" that is created under that post does not have a url as expected (/blog/2012/01/post-name/comments), it instead has a hashtag with the same link. It will not publish even if you try multiple times.

    Additional info: On the RSS feed I noticed that the links it is generating are:
    www.example.com/company-blog/blog/2012/01/post-name 
    while in the posts Properties and on the live site the url functions as:
    www.example.com/blog/2012/01/post-name 

    It is also worth noting that the extensions (.aspx) have been turned off in the config file, and when that broke the Author and Category landing pages, I then turned of the trailing slash for directories. That is why the above urls don't have any extensions or slashes. To troubleshoot this whole matter, I've played around with these with no effect on the publishing problem.

    OK! Now that I've got the back story covered, my theory/question/request is this. Can it be assumed the problem is when you go to publish that the url attempted to be written is causing the server error. Since it is showing up differently in two different places both generated by Umbraco. And if so, has anybody got an idea how to either A) fix it as it now, or B) know how to undo what was done so I can see if it'll start working again.

    I've looked long and hard at getting it back to the default url structure just to test it out, but with no luck.

    Oh yeah, one more thing fwiw, the urls for Authors and Categories are www.example.com/company-blog?category=Blue%20Widgets
    So it only drops that part of the url with posts. That may help narrow down where the customization was done. 

  • Tony Bolton 83 posts 109 karma points
    Feb 27, 2012 @ 16:14
    Tony Bolton
    0

    Hi,

    I stumbled on this post after getting the same ysod today - but it involved no packages, and I'm not using uBlogsy.

    However, and based on what I've read this is pretty much the same of issue, I am intercepting the document publish event to automatically create year/month folders among other things.  Nothing fancy.

    This is how it started causing problems:

    1. I'd create a root folder, say 'Category', which allowed a document type 'Voucher'.
    2. Creating the Voucher was intercepted by the Document.New event.
    3. Various tasks are performed, among which the date folders are created.  This is extremely similar to nForum as most of the basis for the code for the date folders to do this is from there.
    4. The document gets created fine.  I fill in the details, then hit Publish.  This is when I get the error about the Examine indexes.
    5. Weirdly though, the document HAS published - reloading the nodes shows this and the document managed to update.
    6. This is where it starts leaving clues.  If I create a new Voucher in the same Category now, as the date folders already exist, the error no longer occurs.

    These steps can easily be used to reproduce the problem.  The only thing  I could think of as to why it should error only on creation of a first document with new date folders would be if the document id or the path was wrong, causing it to crash.  One of the last things the nforum date code does is call RefreshContent.  I also did this, so took out that last statement and as I suspected it stops the error from occurring.

    My hunch is that because the content is refreshed somehow the context is missing the update, so when Publish happens the null reference is happening (perhaps it's pointing to the old path before the node is moved?).

    I'm almost certain the culprit is RefreshContent() - I've read elsewhere it's viewed as slightly 'evil' - and I had problems with it a few weeks back when deleting nodes using the permanent delete flag.

    Thought this might help if it's at all relevant!!

    Tony

  • aysha 16 posts 36 karma points
    Jul 18, 2012 @ 12:39
    aysha
    0

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 18, 2012 @ 13:26
    Anthony Dang
    0

    Possible that it might be the tags control?

    Change the tag control to use the default umbraco tags and see if the crash is still there.

     

     

  • aysha 16 posts 36 karma points
    Jul 18, 2012 @ 14:17
    aysha
    0

    Hi Anthony

    thanks for your quick reply. Blogs were working fine untill we moved it from old content Node to new One.

    Do u think changing tags will help ?

    I mean is there anything specific with Move operation that has resulted in this problem.

    Cheers

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 18, 2012 @ 15:05
    Anthony Dang
    0

    Ah, I noticed you posted this in the other forum topic.

    Moving nodes wont be a problem as long as the landing node is still the root of the uBlogsy tree.

    Move it back to where it was to see if it still works.

    What versions of Umbraco and uBlogsy are you using?

     

     

  • aysha 16 posts 36 karma points
    Jul 18, 2012 @ 15:07
    aysha
    0

    Hi Anthony

    This is fixed now. The render control in the uTagsy Data type was not set somehow.

    Once I selected the utagsy.ascx as the render control, its working fine now.

    Thanks for all ur help.

Please Sign in or register to post replies

Write your reply to:

Draft