Copied to clipboard

Flag this post as spam?

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


  • overflew 87 posts 110 karma points
    Nov 18, 2010 @ 03:48
    overflew
    0

    AutoFolders auto-publishing?

    I've noticed that the content created within the AutoFolder folders is being published on create - Is this a known issue, and is there a way to stop it?

    I've confirmed it isn't happen to non-AutoFolder folders, and reproduced it several times.

  • overflew 87 posts 110 karma points
    Nov 22, 2010 @ 00:16
    overflew
    0

    *Bump* - Can anyone help on this one? I'm using Umbraco 4.5.2

  • overflew 87 posts 110 karma points
    Dec 02, 2010 @ 21:39
    overflew
    0

    K - so it looks like there are event handlers registered for both New + Publish:

    public ApplicationBase()
            {
                Document.New += new Document.NewEventHandler(Document_New);
                Document.AfterPublish += new Document.PublishEventHandler(Document_New);
            }

    Then regardless, it's calling:

    documentObject.Publish(documentObject.User);
    umbraco.library.UpdateDocumentCache(documentObject.Id);
    

    I've had a quick go at getting it to Save on a New document, though I', getting problems with it creating duplicate letter folders (e.g. 'M (1)'). Will report back - any feedback welcome in the meantime...

  • Chris 69 posts 75 karma points
    Jun 03, 2011 @ 05:54
    Chris
    0

    Hi,

    I'm having the same issue. Did you find a solution or workaround for this?

    Thanks,

    Chris

  • Ismail Mayat 4443 posts 9764 karma points MVP 2x admin c-trib
    Jul 12, 2011 @ 10:29
    Ismail Mayat
    0

    Has anyone patched the source to stop it auto publishing?

    Regards

    Ismail

  • Drew 165 posts 339 karma points
    Jan 27, 2012 @ 12:01
    Drew
    0

    Finally submitted as a patch to codeplex: http://autofolders.codeplex.com/SourceControl/list/patches

    Autopublish now works, plus some other bug fixes and extra providers.

  • Nigel Wilson 924 posts 2035 karma points
    Apr 21, 2012 @ 21:20
    Nigel Wilson
    0

    Hey Drew

    'xcuse my ignorance but how do you apply the patch ? 

    I downloaded the file from codeplex - it is a .patch file but not sure on "where to from here"...

    Cheers

    Nigel

  • Drew 165 posts 339 karma points
    Apr 23, 2012 @ 14:24
    Drew
    1

    If you check-out or download the source from Codeplex, its managed by SVN - you can then apply the .patch file.

    This might help:
    http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-patch.html 

     

    I might see if I can get Tim to update the official release on the Umbraco AutoFolders project page to include this patch.
    (he's down as a project contributor) 

     

    Cheers, 

  • Nigel Wilson 924 posts 2035 karma points
    May 27, 2012 @ 00:43
    Nigel Wilson
    0

    Hi Drew

    Finally getting back to this...

    I have downloaded the source for the project, ran a test build, and the project built OK.

    I then downloaded the patch and applied it via Tortoise SVN, but when doing a rebuild I now get the following error:

    umbraco.BasePages.BasePage' does not contain a definition for 'Current'
    E:\SVN Source Code\Umbraco Autofolders\AutoFolder\ApplicationBase.cs

    So just wondering if you are able to provide any ideas/suggestions - I am a bit stumped.

    My site is 4.5.2 and running ASP.NET3.5, just in case this helps.

    Cheers

    Nigel

  • Drew 165 posts 339 karma points
    May 28, 2012 @ 21:27
    Drew
    0

    Sorry Nigel, been out of the loop for a bit!

     

    So, if the version from CodePlex builds fine, but after you apply the patch it doesn't, I'd suggest downloading the two .patch files (mine and ProNotions) - and rathern than applying the patch you can simply open it up with TortoiseSVN (opens with TortoiseUDiff viewer automatically I believe) - you'll then be able to see which lines have changed and change them manually in your source.

     

    Hopefully, one day we'll get access to CodePlex to accept the patch commits, but Chris is a bit busy I think.

    (the only other option is to create a new CodePlex entry for it....but I'm not so sure about it, since its Chris' project)

     

     

    Cheers,

     

    Drew

  • Nigel Wilson 924 posts 2035 karma points
    May 28, 2012 @ 21:45
    Nigel Wilson
    0

    Hi Drew

    Thanks for that - I was thinking about doing that exact thing this morning - I am getting my head around Tortoise / SVN so will be working through your suggestion over the next few days.

    Thanks for your help / feedback

    Cheers

    Nigel

  • Evan Jardine 108 posts 168 karma points
    Jul 20, 2012 @ 01:13
    Evan Jardine
    0

    Is the auto-publishing problem meant to be fixed in version 2.03 or do you need to patch the source to fix it?  I'm currently using 2.03 and it auto publishes every node it creates.

    I'm not to keen on going back to SVN and causing problems with my Hg and git setup, If someone has an updated dll how about sharing a link?

    Cheers

    Evan

  • Nick Warner 2 posts 22 karma points
    Oct 26, 2012 @ 18:24
    Nick Warner
    0

    Hi

    This worked for me

    1. download code from codeplex
    2. open in VS
    3. add these lines in to ApplicationBase.cs  (first 3 are there already so you know where to put the new final 3)
                            // Republish 
                            documentObject.Publish(documentObject.User);
                            umbraco.library.UpdateDocumentCache(documentObject.Id);
                            //added to fix autopublish bug
                            documentObject.UnPublish();
                            umbraco.library.UnPublishSingleNode(documentObject.Id);
    Then rebuild and overwrite your AutoFolders.dll with the one just created.
    It's a quick and dirty fix, but it worked for me!
Please Sign in or register to post replies

Write your reply to:

Draft