I declaratively created a content type which has an attached event receiver. I attached this ct to a list which is also being done via xml declaration.
In principle all components are working. The event receiver is working, the list is being correctly created and the content type is being attached. But the event receivers are not being attached to the list.
To make the event receivers work I need to remove and re-attach the content type to the list. Once this has been done everything works as expected.

Some information to the feature which is being used.
One feature contains all required fields, the list instance and definition. I also tried to modify the sequence the components but with no result.
Does anyone has an idea why it is behaving like this?

  • what id does your content type have? – Gwny Oct 5 '15 at 14:47
  • It is a folder based one: it starts with 0x012000E461C.... – Husen Oct 5 '15 at 15:00
  • so you generated a new id? – Gwny Oct 5 '15 at 15:01
  • It is a Visual Studio Solution in which I created a bunch of new columns, a folder inherited content type and a custom list. And I put all this together into a new feature. – Husen Oct 5 '15 at 15:03
  • I understand that, but if you use id's which are already present in sharepoint, your behaviour can occur, that's one possible mistake – Gwny Oct 5 '15 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.