CentralAZ / Rock-CentralAZ

An open source CMS, Relationship Management System (RMS), Church Management System (ChMS), and composable application framework.
http://www.rockrms.com
17 stars 3 forks source link

Preference Issue with the Reservation Lava Block #95

Closed jamrphy-bwd closed 5 years ago

jamrphy-bwd commented 5 years ago

Prerequisites

Description

ViewMode buttons on the Reservation Lava Block setting preferences causes error.

  1. The ViewMode buttons (Day, Week, Month) set the preference on each click to their associated modes: image

  2. The function SetFilterControls checks for this preference, and only assigns a default if the preference does not exist: image

  3. Using the block more than once (i.e. with different configurations) will still set the preference for the Day, Week, or Month on button click. Since the configurations may differ between them (Day/Week view disabled, for example) the preference may be valid for one page, but not the other.

Since SetFilterControls only assigns a default if the preference does not exist, the Configuration Error will show if the user last clicked a button on another page that is not supported with the current page's configuration.

Steps to Reproduce

  1. Create 2 pages that use this block
  2. On one page, disable Day/Week Views.
  3. One the other page, click "Day"
  4. Navigate to the other page
  5. See error

Expected behavior:

Default to a valid ViewMode if the preference is not valid for the current configuration

Actual behavior:

Configuration Error

Versions

tcavaletto commented 5 years ago

Fixed in 1.4: https://github.com/CentralAZ/Rock-CentralAZ/commit/79d94c1fa4e85578f350637effa817bf8d48a2ff