locked
Calendar.aspx shows and connects to wrong links.

    Question

  • I have been customizing editform.aspx & newform.aspx. Most of the times I do changes in dev server and bring the changes over to staging ( I copy the entire contents from 'source' option). Sometimes the forms in staging server work and sometimes not.

    Also calendar.aspx which has link to dispform.aspx connects to different URL upon clicking 'title'. I have not customized calendar.aspx but why it is happending. currently it is pointing to editform.aspx directly instead of dispform.aspx. Before this happened I had put my customizations to editform in staging server.

    any ideas?
    Monday, January 11, 2010 3:31 PM

Answers

  • This worked for me in SP 2007:

    • Export the edited form (to my desktop)
    • Delete the the edited form (this changes the calendar links back to DispForm.aspx)
    • Import the edited form (from my desktop)
    Really had me worried that I wouldn't be able to change anything back, but this worked. Hopefully this will help someone.
    • Proposed as answer by Matt_Marshall Thursday, January 20, 2011 9:06 PM
    • Marked as answer by Mike Walsh FIN Friday, January 21, 2011 7:01 AM
    Thursday, January 06, 2011 11:29 PM

All replies

  • I have a calendar List with all out-of-box forms such as newform,dispform,editform,calendar.aspx etc.

    The Title column in Calendar (monthly view etc) shows 'newform.aspx?ID=111' when mouse-hovered and also upon clicking on it.

    Is there a way to check where this URLs are getting stored? The calendar is Out-of-box and is not customized. The 'supporting files' section for this List also has dispform.aspx.

    Where can I find the above and fix?

    Please help. 
    • Edited by Mike Walsh FIN Monday, December 28, 2009 6:25 PM A second LIST missed.
    • Moved by Mike Walsh FIN Monday, December 28, 2009 6:27 PM OOB question not customization (From:SharePoint - Design and Customization)
    • Merged by Xue-Mei Chang-MSFTModerator Wednesday, January 13, 2010 7:01 AM the same issue
    Monday, December 28, 2009 5:17 PM
  • Hi Anirudh,

    This out of box feature. When you hover on Title shows 'newform.aspx?ID=111'.
    Beacause the 111 is the ID of that Calendar list item.

    So this will be used by sharepoint to display which record or List item to Show on List Pages such as NewForm, EditForm.
    Hope this will help you.
    Thanks Shrivallabh Kulkarni MCTS
    Monday, December 28, 2009 5:36 PM
  • Mouse hover should show "dispform.aspx?ID=111". It is showing "Newform.aspx?ID=111".

    Monday, December 28, 2009 5:42 PM
  • Hi,

    Calendar list is not as same as that of Custom list ( e.g.Custom list does not have calendar.aspx ). On the calendar.aspx they set in that way you cant change that.

    Thanks Shrivallabh Kulkarni MCTS
    Monday, December 28, 2009 5:51 PM
  • I have a similar Calendar list and clicking on Title (on the calendar.aspx) takes to dispform.aspx. This is actually OOB.

    My calendar.aspx shows/takes to newform.aspx which is incorrect and can't be OOB feature. There is somewhere it has changed the URL or something. How can I check this?

    • Edited by Mike Walsh FIN Monday, December 28, 2009 6:26 PM CALENDAR and TITLE again. Stop doing this.
    Monday, December 28, 2009 6:01 PM
  • Ok. I will check this.

    Thanks Shrivallabh Kulkarni MCTS
    Monday, December 28, 2009 6:05 PM
  • Hi,

    I can reproduce your issue using the following steps: open NewForm.aspx in Calendar list using SPD> in File >Save as NewForm2.aspx. This will break the Support file links, as now when you click to view an item on calendar.aspx, instead of taking to DispForm.aspx it routes incorrectly to NewForm2.aspx. The resolution is to delete the NewForm2.aspx; this seemed to cause SharePoint to reset the supporting file links to be proper again.

    This blog has steps about how to prevent supporting files from being incorrectly set to erroneous page: http://blogs.msdn.com/spdsupport/archive/2008/04/10/how-to-prevent-supporting-files-from-being-incorrectly-set-to-erroneous-page.aspx

    Hope it can help you.


    Xue-Mei Chang
    Wednesday, December 30, 2009 6:56 AM
    Moderator
  • I see that there are few customized forms of newform.aspx... If I delete the one it is showing on calendar.aspx, what will happen to the customizations done in that customized newform ?

    If the above is not best practice (i.e making copy of newform.aspx and customizing it) then what are the best practices?.


    Wednesday, December 30, 2009 10:04 PM
  • Hi,

    When create a custom list form, we recommend to people not to delete the default form page, just replace them with new pages, or you can edit in the default form, the following steps can help you:

    1.     Open your site in SharePoint Designer, browse to the List and open the ‘NewForm.aspx’ web form.

    2.     Right-click the list form and select “Web part properties”, in the Layout section, select “Hidden”. (We should hide the original form and then create a new list form)

    3.     Go Insert > SharePoint Controls > Custom List Form.

    4.     In the List or Document Library Form dialog, select the List, content type and type of form (select display item form).

    5.     Click OK and a new form is added with controls representing all the fields from the list.

    Hope it helps.


    Xue-Mei Chang
    Thursday, December 31, 2009 2:47 AM
    Moderator
  • Hi,

    We have followed this link of customizing.

    http://office.microsoft.com/en-us/sharepointdesigner/HA101191111033.aspx

    Here it says to make copy of the form and then customize. We didn't delete the default webpart but did hide it?

    Question now is should I use "newform.aspx" itself by hiding default webpart and then inserting custom dataformwebpart? Is that fine? In this case, if some customization goes wrong with the 'newform.aspx' can I switch back to the default behavior just by removing customization and unhiding default webpart? We are bit worried about hyperlinks getting messed up with making copy and then working upon it.

    Thursday, December 31, 2009 1:58 PM
  • you can set the behavior by makin columns visible in Edt View window: there are several kinds of Title: linked to Edit form, linked to Display form.
    Monday, January 11, 2010 3:54 PM
  • thanks for reply.

    I am referring to out-of-box calendar.aspx which will link to dispform.aspx upon clicking on titles against each date. It used to dispform.aspx but when I customized editform.aspx it has automatically linked to editform.aspx. so upon clicking now it takes to editform.aspx

    why is this happening? Is there a way to check how the out-of-box calendar is generating URLs?
    Monday, January 11, 2010 3:58 PM
  • Can anyone suggest if we can debug or trace the calendar webpart in calendar.aspx? I am even unable to convert to XSLT? I do not know from where it is getting the URL links for the TITLE column used in monthly view?

    thanks.

    Tuesday, January 12, 2010 4:54 PM
  • Hi,

    The two threads are the same issue, so I merge them.

    Please try to customize the list form following the steps I said in above posts.

    I think it is possible to convert it to XSLT view, the Title column gets URL from Support file links, your customization may break the Support file links.

    Hope it helps.


    Xue-Mei Chang
    Wednesday, January 13, 2010 7:15 AM
    Moderator
  • I am unable to convert to XSLT. When I do right-click on calendar webpart I do not get that option. Is that out-of-box behavior?

    You had mentioned that 'your cusomization may break support file links'. Is there a way I can find out where those links are stored and atleast view them?  First I had customized newform.aspx and calendar.aspx started putting 'newform' as hyperlink for TITLE in calendar. Now I have customized editform.aspx and it has put 'editform.aspx'.  Looks like something is happening and I am unable to figure it out.

    Please help.......

    Thanks.
    Wednesday, January 13, 2010 4:32 PM
  • I have the same problem. I created a copy of the New and Disp Forms form the existing ones... then customized the copies and save with a new name CustomNewForm.aspx and CustomDispForm.aspx.

    Now when I click on the title in calendar.aspx (which I didn't change)... it navigates to CustomNewForm.aspx instead of DispForm.aspx (or CustomDispForm.aspx). The List properties' supporting files are all set appropriately.

    Did you find anything new out, besides deleting the files?
    Thursday, January 14, 2010 8:45 PM
  • I didn't delete the customized files because I need them as they are customized.

    I have no success so far.

    I am hoping that some genius will post how we can find out where are the supporting links stored or retrieved? Also how I can convert calendar to XSLT?
    Thursday, January 14, 2010 9:56 PM
  • This blog has steps about how to prevent supporting files from being incorrectly set to erroneous page: http://blogs.msdn.com/spdsupport/archive/2008/04/10/how-to-prevent-supporting-files-from-being-incorrectly-set-to-erroneous-page.aspx


    Xue-Mei Chang


    The blog entry above ends with, "NOTE: The steps above are how to prevent supporting files from being incorrectly set to erroneous page, not how to fix a pre-existing problem. That's quite a bit more tricky."

    Who knows the tricky solution? I want that one rather then all of this other kludge.

    Friday, May 21, 2010 3:28 PM
  • I just ran into this issue, too.  I realized I was spending too much time looking for a server-side or .NET code-based fix, and just wrote some simple javascript (jQuery) to add to the calendar.aspx page in a content editor web part.  

    Since the problem is apparently caused by modifying the calendar's default EditForm.aspx page, you shouldn't have a problem modifying another view.  Stick this in a CEWP on the calendar.aspx view page and you should be fine (for now) --

     

    $(document).ready(function() {
      //find all hyperlinks in the table holding calendar links and
      //change them to point at the display page instead of the edit page
      $("table[id^='CalViewTable']").find("a[href*='EditForm.aspx']").each(function(){
      var originalUrl = $(this).attr("href");
      var newUrl = originalUrl.replace("EditForm.aspx", "DispForm.aspx");
    $(this).attr("href", newUrl);
    });
    }); 

    • Proposed as answer by Eric Murriguez Wednesday, November 10, 2010 7:45 PM
    • Unproposed as answer by Mike Walsh FIN Thursday, November 11, 2010 6:54 AM
    Wednesday, November 10, 2010 7:44 PM
  • This worked for me in SP 2007:

    • Export the edited form (to my desktop)
    • Delete the the edited form (this changes the calendar links back to DispForm.aspx)
    • Import the edited form (from my desktop)
    Really had me worried that I wouldn't be able to change anything back, but this worked. Hopefully this will help someone.
    • Proposed as answer by Matt_Marshall Thursday, January 20, 2011 9:06 PM
    • Marked as answer by Mike Walsh FIN Friday, January 21, 2011 7:01 AM
    Thursday, January 06, 2011 11:29 PM
  • This worked for me in SP 2007: but this worked.

    This was awesome!  This worked for me and solved this issue quickly for me.
    • Edited by Mike Walsh FIN Friday, January 21, 2011 7:01 AM do not use full quote
    Thursday, January 20, 2011 9:05 PM