eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
222 stars 115 forks source link

Error openning Modeldifference detail view (no matter if role or user) #852

Closed chulanbetra closed 11 months ago

chulanbetra commented 3 years ago

Hello, I updated expand to version 20.2.503. I am using couple expand modules as nuget packages, one of them is modeldifference (web and win). I can start win application without problems, but when I try to open detailview of modeldifference object (user or role) I get this error:

Exception occurs while the 'Xpand.Persistent.Base.General.Controllers.CustomAttributesController' customizes TypesInfo: Object reference not set to an instance of an object.

at Xpand.Persistent.Base.General.Controllers.CustomAttributesController.HandleCustomAttribute(IMemberInfo memberInfo, ITypesInfo typesInfo) in D:\a\1\s\Xpand\Xpand.Persistent\Xpand.Persistent.Base\General\Controllers\CustomAttributesController.cs:line 26

It is exactly this var typeInfo = typesInfo.FindTypeInfo(theValue); if (customAttribute is PropertyEditorAttribute && typeInfo.IsInterface) ...

with memberInfo memberInfo = {Xpand.Persistent.BaseImpl.JobScheduler.Calendars.XpandAnnualCalendar-DatesExcluded} and theValue = Xpand.Persistent.Base.General.IChooseFromListCollectionEditor

I see that this code is also being executed when application starts and there is no problem with getting typeinfo for Xpand.Persistent.Base.General.IChooseFromListCollectionEditor. Only when it is running and I open the detail view.

Although I am running on older database with existing data (we are updating application for customer after long time), I tested this on new empty database and the error is present there too (I assume you have to include jobscheduler module as I do).

Thanks for answer

apobekiaris commented 3 years ago

do u have a repro sample? else u may follow my previous answer.

  1. Disable the controller with XpandModuleBase.DisabledControllers.Add(typeOf(CustomAttributesController))
  2. Copy the source code of the controller to you solution so u can be able to modify it, put it in FIP namespace
  3. We need to disable the controller using some static variable once activated e.g. set the var to true and do not call the CustomizeTypesInfo if true.
chulanbetra commented 3 years ago

do u have a repro sample? else u may follow my previous answer.

1. Disable the controller with  `XpandModuleBase.DisabledControllers.Add(typeOf(CustomAttributesController))`

2. Copy the source code of the controller to you solution so u can be able to modify it, put it in FIP namespace

3. We need to disable the controller using some static variable once activated e.g. set the var to true and do not call the CustomizeTypesInfo if true.

Hello,

Disabling CustomAttributeController worked for me. As I do not need the controller right now I did not copy any code into my solution yet (will check the modules if they are working).

Thanks.

apobekiaris commented 3 years ago

As I do not need the controller right now I

hope u are sure :)

expand commented 11 months ago

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.