Problem/Motivation

The Spud blocks that require the hardcoded Calendar URL won't work when the url changes. This is problematic when moving between Development/Production environments.

Proposed resolution

Add a calendar "path" form field to the main Trumba configuration (/admin/config/trumba/trumbaconfiguration) which could then be used to build a dynamic Calendar URL based on system settings.

Comments

ericpugh created an issue. See original summary.

ericpugh’s picture

Created a patch to allow the "calendar url" setting on the three Trumba blocks to allow a user to enter either an external url or an internal path. (i.e. "/node/1" or "/calendar")
Internal paths are stored in configuration as a Uri String, and therefore makes it possible to keep the correct settings when moving configuration between environments. I also created a TrumbaBlockBase to try to reduce some of the duplication across Trumba block types.

ericpugh’s picture

StatusFileSize
new19.45 KB

The correct patch.

carsonblack’s picture

Thanks for the refactor @ericpugh! I will review in the next day or two. At first glance, looks legit. I've just been doing more Form API stuff in D8 lately and this is definitely the correct way to do it. Oh, and also the url setting thing, for sure... ;-)

carsonblack’s picture

Status: Active » Reviewed & tested by the community

Applied cleanly and works fine. Thanks @ericpugh!

carsonblack’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.