sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Using createSPList on existing Site Pages list results in newly created list

Open Robert1976 opened this issue 7 years ago • 10 comments

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

I am using the createSPList verb to add site columns to an existing library (in my case the 'Site Pages' list with template 119). As value for the parameter listName I use 'Site Pages'.

My SiteScript works fine as long as I choose English as the site language at site creation time. However, when I choose for example Dutch, a second 'Site Pages' library is created next to the out of the box 'Site Pages' library (I end up with 2 Site Page libraries with template 119). Expected behavior is that my sitescript works with any language an enduser can choose at self service site creation.

Thank you.

Robert1976 avatar Dec 04 '18 15:12 Robert1976

This seems to be a bug. I tried with ListName SitePages and subaction as Title = Site Pages. It created 2 different library with same Name and the new library has URL as SitePages1.

iamguptarishi avatar Dec 14 '18 23:12 iamguptarishi

I just experienced the same. I used the createSPList verb with a listName property of "ClientDetails". I then used the "setTitle" subaction to change the name to "Client Details". When reapplying the associated site design it keeps on creating a new list, with an incrementing number added to the URL. I understand why this is happening. Perhaps we could have Internal/Display Name properties so that we don't need to "rename" the list after creation? Obvious workaround for now is to not use the setTitle subaction within createSPList.

jstrugnell avatar Jan 04 '19 12:01 jstrugnell

We are experimenting the same. @seansquires is this something you guys are aware of? It looks like me might be blocked by this right now. Thanks!

sebastienlevert avatar Jan 24 '19 15:01 sebastienlevert

updating - seems like a duplicate of #2993 .

bcameron1231 avatar Feb 11 '19 18:02 bcameron1231

@bcameron1231 No, this is not a duplicate. I tried using listName "SitePages" and listName "Site Pages" (and template 119) but still 2 libraries are created. In my opinion the way this should work is checking if a list with the same url as the listName/listUrl parameter from the site script exists. (optionaly with a listTitle parameter) If so we should have a boolean parameter "updateExistingList" or something which, if true off course, updates the list or not.

Currently this won't work on any list if we have to support list titles in multiple languages and want to use the same url for each language, because I'm not able to change the title. If I do, on each re-apply of the sitedesign a new list is created.

Another small and nice addition would be if we could specify is the list is created under /lists or not. :-)

henkterharmsel avatar Sep 25 '19 15:09 henkterharmsel

Any updates on this one?

henkterharmsel avatar Jan 07 '20 12:01 henkterharmsel

Any updates on this?

Renevdo avatar Feb 26 '21 15:02 Renevdo

Adding @melitoSP for notice/follow-up

seansquires avatar Feb 26 '21 16:02 seansquires

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open or submit a new issue.

ghost avatar Dec 30 '21 14:12 ghost

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Jan 06 '22 18:01 ghost