SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
574 stars 346 forks source link

Event and Event Calendar Item Attributes different on Calendar Item Lava Block #4679

Closed raufrecht closed 2 years ago

raufrecht commented 3 years ago

Prerequisites

Description

When writing Lava for the Calendar Item Lava Block, you can reference the Event's Attributes using {{ Event | Attribute:'xxx' }} and also using {{Event.EventCalendarItems | Attribute:'xxx' }}. Technically, they should be showing the same attributes.

Steps to Reproduce

Unable to reproduce on Demo Site

Expected behavior:

Event and Event.EventCalenderItems Attributes should be identical

Actual behavior:

The Event Attribute points to a totally different Event, as if it is looking at EventItem table instead of EventCalendarItem table to connect the tables. See the attachment of a Lava Debug to see what Lava is displaying. The EventCalendarItem shows no Attribute named "CallToAction", but the Event Attribute at the bottom shows an incorrect "CallToAction". All of those attributes point to the same Event. Web capture_6-5-2021_8291_www oneandall church

What we noticed was when we use sql to join the EventCalendarItem table to the AttributeValue table using the AttributeId, we get the correct association of the Attribute to the Event, but if we were to join the EventItem table to the AttributeValue table using the same AttributeId, we get the incorrect association of the attribute to the Event.

Versions

MrUpsideDown commented 2 years ago

Hi @raufrecht - I'm currently looking into this issue and it would be helpful if I could clarify a couple of things:

  1. What is the exact name of the block where you are experiencing this problem? There are a number of event-related blocks and I want to be sure we are looking at the same one. (My best guess would be the Calendar Event Item Occurrence Detail block, based on the closest match for the Lava model shown in your Debug output?)
  2. Which Calendar is the "CallsToAction" Attribute defined on?

With the data currently available in this block, it's worth noting that the Event and EventCalendarItems Attributes won't be identical if there are different attributes defined for each of the calendars in which the Event exists. The "Event" Lava object (which corresponds to the EventItem Rock model) includes a roll-up of Attributes that have been defined for any of the calendars this Event exists in, whereas the EventCalendarItem Attributes collection only includes the attributes defined for the specific calendar.

I'm not sure if this helps explain what you are seeing, but if you can help me out by answering those questions, I'll have a better understanding of where the problem might be - thanks.

raufrecht commented 2 years ago
  1. We are using the Calendar Event Item Occurrence Lava block
  2. The Attribute is on The Public calendar. We only use the 1 calendar for all our events on the website.
MrUpsideDown commented 2 years ago

@raufrecht - I'm still having trouble reproducing this issue, have you had any success replicating it on the demo site? To get some details on the Attributes that might be relevant here, can you please provide the output of this SQL:

SELECT av.Id, AttributeId, Value, EntityTypeId, EntityId, EntityTypeQualifierColumn, EntityTypeQualifierValue
FROM [AttributeValue] av
INNER JOIN [Attribute] a ON a.Id = av.AttributeId
WHERE a.[Key] = 'CallsToAction'
raufrecht commented 2 years ago

Randy Aufrecht IT Manager

On Wed, Jan 12, 2022 at 11:15 AM David Leigh @.***> wrote:

@raufrecht https://github.com/raufrecht - I'm still having trouble reproducing this issue, have you had any success reproducing it on the demo site? To get some details on the Attributes that might be relevant here, can you please provide the output of this SQL:

SELECT av.Id, AttributeId, Value, EntityTypeId, EntityId, EntityTypeQualifierColumn, EntityTypeQualifierValue FROM [AttributeValue] av INNER JOIN [Attribute] a ON a.Id = av.AttributeId WHERE a.[Key] = 'CallsToAction'

— Reply to this email directly, view it on GitHub https://github.com/SparkDevNetwork/Rock/issues/4679#issuecomment-1011369973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4UITXEZWWIZGSVSRDHXGTUVXHNFANCNFSM44IF2U7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

MrUpsideDown commented 2 years ago

@raufrecht - I can't see any SQL output in your previous post?

raufrecht commented 2 years ago

39463689 24200 Serve^ https://www.oneandall.church/loveinaction/serve|Spiritual Gifts Test^ https://www.oneandall.church/spiritualgifts 208 3280 ContentChannelTypeId 15 40340005 24200 Join a Serve Team^https://www.oneandall.church/serve 208 3397 ContentChannelTypeId 15 41208505 24200 FIND A COMMUNITY GROUP^ https://www.oneandall.church/community|DOWNLOAD GROWTH CARD^ https://cloudimages.oneandall.church/upload/v1629928730/pdfs/community/2021_PursuingJesus/Commitment_Card_Printable_File_vsbpsy.pdf 208 3498 ContentChannelTypeId 15 42084232 24200 Sign Up to Serve^https://www.oneandall.church/outreach/serve 208 3570 ContentChannelTypeId 15 42378558 24200 GIVE NOW^https://www.oneandall.church/appgive/campusselector 208 3595 ContentChannelTypeId 15 43887512 24200 MAKE A DECISION^https://www.oneandall.church/jesus 208 3753 ContentChannelTypeId 15 44314947 24200 Make a Decision^https://www.oneandall.church/jesus|Schedule a Baptism^https://www.oneandall.church/baptism 208 3763 ContentChannelTypeId 15 44624013 24200 Information on 2022 Global Trips^ https://www.oneandall.church/global 208 3814 ContentChannelTypeId 15 44921886 24200 Make A Decision^https://www.oneandall.church/Jesus 208 3858 ContentChannelTypeId 15 45221873 24200 Make A Decision^https://www.oneandall.church/jesus 208 3876 ContentChannelTypeId 15 45543249 24200 Make A Decision^https://www.oneandall.church/Jesus 208 3891 ContentChannelTypeId 15 45838083 24200 Make a Decision^https://www.oneandall.church/jesus 208 3909 ContentChannelTypeId 15 45838152 24200 Make a Decision^https://www.oneandall.church/jesus 208 3910 ContentChannelTypeId 15 46420442 24200 Make A Decision^https://www.oneandall.church/jesus 208 3953 ContentChannelTypeId 15 46716618 24200 Make a Decision^https://www.oneandall.church/jesus 208 3979 ContentChannelTypeId 15 33677499 22068 Subscribe To Podcast^https://www.oneandall.church/podcasts 208 2788 ContentChannelTypeId 3 34527553 22068 Find Your Community^https://www.oneandall.church/community 208 2825 ContentChannelTypeId 3 34545232 22068 Learn more about Jesus^https://www.oneandall.church/Jesus 208 2830 ContentChannelTypeId 3 39165574 22068 Love In Action^https://www.oneandall.church/loveinaction 208 3253 ContentChannelTypeId 3 42383209 22068 Info on Global Trips^https://www.oneandall.church/global 208 3603 ContentChannelTypeId 3 26870090 18813 Attend Online^https://www.oneandall.church/prayernight 270 10 EventCalendarId 1 26870535 18813 Sign up for Orientation^ https://www.oneandall.church/community/groupregister/22a8968f-5174-4d7e-9917-f5f1c22af99a|Like us on Facebook^https://www.facebook.com/groups/ccvcare 270 23 EventCalendarId 1 26867190 18813 Sign up for a Starting Point Group^ https://www.oneandall.church/startingpoint 270 40 EventCalendarId 1 29588799 18813 Apply^/trips/Mexico 270 48 EventCalendarId 1 44625308 18813 Apply^/trips/Mexico 270 50 EventCalendarId 1 43564244 18813 Rancho GriefShare Seminar^ https://www.griefshare.org/holidays/events/39759|San Dimas GriefShare Seminar^https://www.griefshare.org/holidays/events/37514|San Dimas DivorceCare Seminar^https://www.divorcecare.org/holidays/events/37616 270 81 EventCalendarId 1 29876284 18813 Reserve A Seat^ https://www.oneandall.church/christmas/servicereservation|Attend Online^ https://www.oneandall.church/online 270 95 EventCalendarId 1 29876204 18813 Reserve A Seat^ https://www.oneandall.church/christmas/servicereservation|Attend Online^ https://www.oneandall.church/online 270 96 EventCalendarId 1 28726637 18813 Find a Starting Point Group^ https://www.oneandall.church/startingpoint 270 147 EventCalendarId 1 28125641 18813 Watch Now^https://www.oneandall.church/online 270 175 EventCalendarId 1 27115390 18813 Register Here^ https://trustfpm.zoom.us/webinar/register/WN_H4jB60JmRu69_ic2OcYxPQ 270 179 EventCalendarId 1 27117233 18813 Sign Up to Volunteer^https://www.gods-pantry.org/ 270 181 EventCalendarId 1 28125547 18813 Facebook^https://www.facebook.com/oneandallchurch|YouTube^ https://www.youtube.com/user/ccvsocal 270 182 EventCalendarId 1 26867985 18813 Instagram^https://www.instagram.com/oneandallchurch/|Facebook ^https://www.facebook.com/oneandallchurch/ 270 183 EventCalendarId 1 38575874 18813 Register^ https://www.oneandall.church/registration/HeySister2021 270 184 EventCalendarId 1 26867111 18813 Watch Now^https://www.youtube.com/c/ONEANDALLYouth 270 185 EventCalendarId 1 27117252 18813 Make an appointment now^ https://giftoflife.lstream.org/donor/schedules/drive_schedule/90167 270 186 EventCalendarId 1 28114353 18813 RSVP^ http://sandimaschamber.chambermaster.com/events/search?q=Coping+During+COVID&c=&Lookahead= 270 187 EventCalendarId 1 26870393 18813 Facebook Event^ https://www.facebook.com/events/236625067789257/?acontext={"event_action_history":[{"extra_data":"[]"%2C"mechanism":"main_list"%2C"surface":"main_list"}%2C{"extra_data":"[]"%2C"mechanism":"surface"%2C"surface":"create_dialog"}]%2C"source":"5"}&utm_source=ONE&ALL News&utm_campaign=7283349bf6-EMAIL_CAMPAIGN_2019_11_04_07_38_COPY_01&utm_medium=email&utm_term=0_27c54e01d0-7283349bf6-117944733 270 191 EventCalendarId 1 28114530 18813 For More Information^http://www.shoedrive.alchristian.com/ 270 194 EventCalendarId 1 28657897 18813 Attend Online^https://www.oneandall.church/PrayerNight 270 195 EventCalendarId 1 29588318 18813 Learn More About ADMT^https://africadevelopmentmission.org/ 270 196 EventCalendarId 1 29588514 18813 Learn More About CCP^https://www.ccpkenya.org/ 270 197 EventCalendarId 1 29588519 18813 Learn More About CICM^https://www.indiamission.org/ 270 198 EventCalendarId 1 29588911 18813 Learn More About Watoto^https://www.watoto.com/villages/ 270 199 EventCalendarId 1 29878049 18813 Reserve A Seat^ https://www.oneandall.church/ServiceReservation|Attend Online^ https://www.oneandall.church/online 270 200 EventCalendarId 1 32573077 18813 270 203 EventCalendarId 1 34529222 18813 Attend Online^https://www.oneandall.church/online 270 207 EventCalendarId 1 35127948 18813 More Information^https://www.ignitefamilyconference.com/ 270 209 EventCalendarId 1 36563740 18813 Conference Update^https://www.oneandall.church/YthConfUpdate 270 225 EventCalendarId 1 37139509 18813 270 227 EventCalendarId 1 37139992 18813 Serve^ https://www.oneandall.church/AtTheMovies/MovieNight/Serve 270 228 EventCalendarId 1 37139991 18813 Serve at Movie Night^ https://www.oneandall.church/movienight/serve 270 229 EventCalendarId 1 37428107 18813 Sign up for a Starting Point Group^ https://www.oneandall.church/startingpoint 270 231 EventCalendarId 1 39459680 18813 Make an appointment now^ https://giftoflife.lstream.org/donor/schedules/drive_schedule/93428 270 241 EventCalendarId 1 39462132 18813 MORE INFO^https://www.oneandall.church/youngadults 270 242 EventCalendarId 1 44018747 18813 270 254 EventCalendarId 1 44625471 18813 Learn More About GRACE^https://giverefugeesachance.org/ 270 255 EventCalendarId 1 Randy Aufrecht IT Manager

On Wed, Jan 12, 2022 at 11:45 AM David Leigh @.***> wrote:

@raufrecht https://github.com/raufrecht - I can't see any SQL output in your previous post?

— Reply to this email directly, view it on GitHub https://github.com/SparkDevNetwork/Rock/issues/4679#issuecomment-1011392762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4UITRBGTFBC5ED4AHY34TUVXK5DANCNFSM44IF2U7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

MrUpsideDown commented 2 years ago

@raufrecht - Sorry it's taken me a while to follow this up. I've tried a number of ways to reproduce this issue without any success. At this point, I'm not sure if this is a problem that is specific to your data or just a combination of steps I haven't thought to try. To move this issue forward, can you please provide the steps to reproduce what you are seeing on the demo site so I can also reproduce and fix the problem. Your help in closing this issue would be much appreciated!

MrUpsideDown commented 2 years ago

@raufrecht - After further investigation, it appears highly likely that this issue is directly linked to #4931, which has been recently fixed. On that basis, I am closing this issue also. Please re-open if you find that the fix does not address your issue and you have additional information on how to reproduce the problem.