Commit Graph
4 Commits
Author SHA1 Message Date
frommeandClaude Opus 5.5 5455973dba feat: Kalender-Code replaces the product's calendar hotel
Every hotel field now has one job. The hotel's code and aliases are
import codes only (dates, lookups); a new Kalender-Code (calendar_code)
decides the availability a record shows and may be shared by a house's
summer and winter records. The product's "Unterkunft für
Belegungskalender" is replaced by the checkbox "Kalender anzeigen"
(show_calendar): a product page shows the calendar of the hotel it
displays, the season still decides which one.

- Price calendar, price tables, Belegungskalender, iCal feeds and
  /api/calendar-hotels read the Kalender-Code. A feed without one answers
  404 instead of an empty calendar.
- The upgrade wizard epProductsCalendarCode fills both fields from
  calendar_hotel, preserving today's calendars; the deploy runs it between
  the schema update and the switch. calendar_hotel stays in the database,
  so the previous release keeps working. ep:calendar-codes lists the
  product pages whose calendar differs from it.
- HotelCodeResolver is the one lookup of import codes (date import,
  /api/hotel, Travelinfo); a code on several records resolves to the
  record whose own code it is, then the lowest uid, with a warning.
  Saving a code that is already another visible record's import code is
  refused with a message naming that record.
- /api/product without hotel attaches the product's only visible
  Unterkunft (422 otherwise) and adds board_description,
  additional_services and calendar_hotel_code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 17:18:00 +01:00
frommeandClaude Opus 5.5 48f22a7787 fix: n8n's JSON-LD endpoint only overwrites plain html content elements
PUT /api/json-ld/{uid} replaced the bodytext of any content element, so a
wrong uid in n8n could wipe visible page content (text, plugins, ...).
Elements of any other CType than html are now refused with 409 before
anything is written.

The group's "Explicitly allow tt_content:CType:html" does not guard this on
its own, since the endpoint bypasses DataHandler's record access checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 09:22:39 +01:00
frommeandClaude Opus 5.5 7ae9aa266e feat: n8n can replace the JSON-LD of content elements via PUT /api/json-ld/{uid}
n8n is the source of truth for the SEO markup: the element's bodytext is
overwritten with the posted object, wrapped in a ld+json script element.
Values are escaped with JSON_HEX_TAG so they cannot close the element.

The endpoint has its own key (jsonLdApiKey, header only) and writes through
DataHandler as the non-admin backend user _n8n, so every change is in the
record history and can be undone there, and the page cache is cleared.

Until the key and the user exist on prod, every request answers 403/503.
Prod setup (group n8n, user _n8n) is in docs/cms-api.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 17:40:23 +01:00
frommeandClaude Opus 5.5 2bd663a9bf docs: CMS API and calendars
docs/cms-api.md describes the endpoints TYPO3 serves to MyE&P and the
chatbot (/api/hotel, /api/product, /api/calendar-hotels,
/api/content/*): key, parameters, responses, errors. It is the other
side of MyE&P's API consumer guide.

docs/calendars.md covers the price calendar, the Belegungskalender and
the iCal feed: which product gets which, the MyE&P endpoints behind
them, caching, troubleshooting, and the rule that a product's calendar
hotel must carry the BusPro code, not a group house's CMS code (which
broke three example trips).

The README replaces the TYPO3 base distribution boilerplate and links
both. The plugin renaming SQL in ep_products' README is obsolete since
the migration. The cmsApiKey description names /api/calendar-hotels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:37:36 +01:00