Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix Field Type as Calendar Event Attribute Throws Error Upon Editing an Event Item #5305

Closed
1 task done
mikedotmundy opened this issue Feb 10, 2023 · 0 comments
Closed
1 task done
Labels
Fixed in v16.4 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@mikedotmundy
Copy link

mikedotmundy commented Feb 10, 2023

Please go through all the tasks below

  • Check this box only after you have successfully completed both the above tasks

Please provide a brief description of the problem. Please do not forget to attach the relevant screenshots from your side.

I am unable to edit an Event Item after adding a Calendar Event Attribute, field type Matrix.

Stack Trace:

at System.Web.UI.ScriptRegistrationManager.RegisterStartupScript(Control control, Type type, String key, String script, Boolean addScriptTags)
   at Rock.Web.UI.Controls.ReorderField.Initialize(Boolean sortingEnabled, Control control) in C:\Github\Rock\Rock\Web\UI\Controls\Grid\ReorderField.cs:line 85
   at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
   at Rock.Web.UI.Controls.Grid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) in C:\Github\Rock\Rock\Web\UI\Controls\Grid\Grid.cs:line 1391
   at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
   at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data)
   at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
   at Rock.Web.UI.Controls.AttributeMatrixEditor.BindGrid(Nullable`1 attributeMatrixGuid) in C:\Github\Rock\Rock\Web\UI\Controls\AttributeMatrixEditor.cs:line 651
   at Rock.Web.UI.Controls.AttributeMatrixEditor.set_AttributeMatrixGuid(Nullable`1 value) in C:\Github\Rock\Rock\Web\UI\Controls\AttributeMatrixEditor.cs:line 300
   at Rock.Field.Types.MatrixFieldType.SetEditValue(Control control, Dictionary`2 configurationValues, String value) in C:\Github\Rock\Rock\Field\Types\MatrixFieldType.cs:line 388
   at Rock.Web.Cache.AttributeCache.AddControl(ControlCollection controls, AttributeControlOptions options) in C:\Github\Rock\Rock\Web\Cache\Entities\AttributeCache.cs:line 779
   at Rock.Attribute.Helper.AddEditControlsForCategory(String categoryName, IHasAttributes item, Control parentControl, String validationGroup, Boolean setValue, AttributeAddEditControlsOptions addEditControlsOptions) in C:\Github\Rock\Rock\Attribute\Helper.cs:line 2851
   at Rock.Attribute.Helper.AddEditControls(String category, List`1 attributeKeys, IHasAttributes item, Control parentControl, String validationGroup, Boolean setValue, List`1 exclude, Nullable`1 numberOfColumns) in C:\Github\Rock\Rock\Attribute\Helper.cs:line 2783
   at Rock.Attribute.Helper.AddEditControls(IHasAttributes item, Control parentControl, Boolean setValue, String validationGroup, List`1 exclude, Boolean supressOrdering, Nullable`1 numberOfColumns) in C:\Github\Rock\Rock\Attribute\Helper.cs:line 2733
   at Rock.Attribute.Helper.AddEditControls(IHasAttributes item, Control parentControl, Boolean setValue, String validationGroup, Boolean supressOrdering) in C:\Github\Rock\Rock\Attribute\Helper.cs:line 2689
   at RockWeb.Blocks.Event.EventItemDetail.ShowItemAttributes() in C:\inetpub\wwwroot\Blocks\Event\EventItemDetail.ascx.cs:line 949
   at RockWeb.Blocks.Event.EventItemDetail.ShowEditDetails(EventItem eventItem) in C:\inetpub\wwwroot\Blocks\Event\EventItemDetail.ascx.cs:line 789
   at RockWeb.Blocks.Event.EventItemDetail.btnEdit_Click(Object sender, EventArgs e) in C:\inetpub\wwwroot\Blocks\Event\EventItemDetail.ascx.cs:line 286
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)### Expected Behavior ###

Should be able to use a Matrix Attribute as a Calendar Event Attribute.

Actual Behavior

Unable to use a Matrix Attribute as a Calendar Event Attribute because you cannot edit the Event Item.

Steps to Reproduce

  • Create an Attribute Matrix Template. I made a simple one with a File attribute.
  • Go to the Public calendar, edit it, expand the Event Attributes section, and add an attribute, Field Type Matrix. Set it to your newly created Template.
  • Save
  • Click on any Event Item under this Calendar.
  • Attempt to edit the Event Item.
  • See error

Rock Version

v13.7, v15.0

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added the Type: Bug Confirmed bugs or reports that are very likely to be bugs. label Apr 27, 2023
@sparkdevnetwork-service sparkdevnetwork-service added the Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v16.4 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

3 participants