Copied to clipboard

Flag this post as spam?

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


  • Steven Horler 11 posts 57 karma points
    Feb 22, 2011 @ 14:21
    Steven Horler
    0

    Preview errors when no tags on a page.

    Hi,

    Hope you can help an Umbraco newbie.

     

    I'm trying to get the Related Pages by Tags working, and specifically previewing a page, and works great when content is tagged, however, previewing a page with no tags fails with the exception Incorrect syntax near ')'.   :-( 

     

    The stacktrace is listed below. Thanks in advance for any help.

     

     

     

    Incorrect syntax near ')'.

    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.Data.SqlClient.SqlException: Incorrect syntax near ')'.

     

    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:

     

     


    [SqlException (0x80131904): Incorrect syntax near ')'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +58
       System.Data.SqlClient.SqlDataReader.get_MetaData() +118
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6312385
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6313986
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +228
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +262
       umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteReader(String commandText, SqlParameter[] parameters) +26
       umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +148

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader]
       umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) +261
       umbraco.cms.businesslogic.Tags.Tag.GetDocumentsWithTags(String tags) +267
       SkybrudUmbraco.RelatedPagesByTag.Page_Load(Object sender, EventArgs e) +623
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048

  • René Pjengaard 117 posts 700 karma points c-trib
    Feb 23, 2011 @ 09:29
    René Pjengaard
    0

    Hi Steven,

    actually i posten a reply yesterday, but i can see that it is gone today, so i will try again. I have installed a new local solution (4.6) and installed the package. No problem viewing pages with no tags. I uptimized the sourcecode a little bit, so please try with this assembly http://dl.dropbox.com/u/538620/Skybrud.Umbraco.RelatedPagesByTags.dll and let me know if it works.

    Regards
    René

  • Steven Horler 11 posts 57 karma points
    Feb 23, 2011 @ 15:23
    Steven Horler
    0

    Hi René,

    Thanks for the reply. I gave it a go but with no luck I'm afraid. 

    I'm using Umbraco 4.6.1, and I've also installed OpenCalais for tag generation. If I add tags it works, then remove all tags and publish I get the error. If I also create a new page with no tags I get the error. Can't see what it might be if you're not experiencing the same? OpenCalais is in the mix I know but can't see that this is affecting things. Is there anything you can suggest, or shed light on?

    Many thanks,

    Steven

  • René Pjengaard 117 posts 700 karma points c-trib
    Feb 23, 2011 @ 15:32
    René Pjengaard
    0

    Hi again,

    sorry it didn´t work. Hmmm i have not tried it with OpenCalais, but you are more than welcome to have a look at the sourcecode if you like http://dl.dropbox.com/u/538620/RelatedPagesByTags.zip. If you find a solution for your problem, you are more than welcome to send me bag the code, and i´ll create a new package (with you as collaberator).

    Best regards
    René

Please Sign in or register to post replies

Write your reply to:

Draft