Problem/Motivation

Our reservation/calendaring system is built around a custom "reservation" entity instead of a node/content entity. Is it possible to get the module to work with a custom entity?

Right now, when I try to follow the usage instructions, I get errors saying "InvalidArgumentException: Field title is unknown", which I assume is because the base field on the entity is "name" instead of "title".

Comments

jwineichen created an issue.

solide-echt’s picture

Apologies for replying late. In principle there's nothing preventing us from using calendar for custom entities, provided the entity supports views integration (e.g. extend EntityViewsData) to start with. It's not high on my priority list though - as you probably figured out already. I've just finished a rather complicated project - meaning ambition and budget were somewhat misaligned :-) - so hope to spend some dedicated time on calendar in the coming weeks. Stay tuned...

jwineichen’s picture

Ambition/budget misalignment; has that ever not happened?

Completely understand about priorities. I assume the vast majority of Calendar users are working with node entities and not custom ones.

I was able to cobble together a calendar-like view by grouping by date and then writing out a VERY elaborate series of Grid CSS rules. It's nowhere close to perfect (gotta work with the tools/skills you have) and getting this module to work would be way better, but it's at least mostly functional until that time hopefully comes.

dunot’s picture

Get the issue for standart node on Drupal core 9.3.13.
InvalidArgumentException: Field is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField()
Views cont. filter is created_year