Skip to content

search schema warning fix - #747

Open
Akhill2020 wants to merge 3 commits into
mainfrom
issue-schema-search-console-warning
Open

search schema warning fix#747
Akhill2020 wants to merge 3 commits into
mainfrom
issue-schema-search-console-warning

Conversation

@Akhill2020

@Akhill2020 Akhill2020 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description: Fix The Event Schema Markup in Simple Calendar appears to be missing some fields:

Missing field “eventAttendanceMode”
Missing field “endDate”
Missing field “offers”
Missing field “image”
Missing field “eventStatus”
Missing field “performer”
Missing field “organizer”

Clickup: https://app.clickup.com/t/1867958/86cypavtm

Summary by CodeRabbit

  • New Features

    • Added comprehensive Schema.org event metadata, including dates, status, attendance mode, images, organizers, performers, and ticket or free-event details.
    • Added end dates for eligible single-day, all-day events.
  • Improvements

    • Event listings now use secure Schema.org references and enhanced event metadata.
    • Event details better represent in-person and supported virtual meeting formats.
    • Improved event data for search engines and rich results.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Calendar events now use HTTPS Schema.org Event URLs and include metadata generated by Event_Schema. The metadata covers dates, status, attendance mode, images, organizers, performers, and offers. Event_Builder adds end-date metadata for eligible all-day events.

Changes

Event schema metadata

Layer / File(s) Summary
Event schema generation
includes/events/event-schema.php
Event_Schema generates metadata for event dates, status, attendance mode, images, organizers, performers, and offers.
Calendar schema rendering
includes/abstracts/calendar.php, includes/calendars/views/default-calendar-grid.php, includes/calendars/views/default-calendar-list.php
Calendar delegates metadata generation to Event_Schema. The list view renders the metadata with the HTTPS Schema.org Event URL. The grid view removes Schema.org microdata attributes.
All-day event date metadata
includes/events/event-builder.php
Event_Builder adds an escaped endDate metadata tag for eligible single-day all-day events.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CalendarView
  participant Calendar
  participant Event_Schema
  CalendarView->>Calendar: request event schema metadata
  Calendar->>Event_Schema: create schema generator for Event
  Event_Schema-->>Calendar: return metadata
  Calendar-->>CalendarView: return metadata
  CalendarView->>CalendarView: render metadata in event markup
Loading

Suggested reviewers: rosinghal

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing schema warnings in search results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-schema-search-console-warning

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 PHPStan (2.2.7)

PHP Warning: require(/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory in /vendor/composer/autoload_real.php on line 39
Warning: require(/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory in /vendor/composer/autoload_real.php on line 39
PHP Fatal error: Uncaught Error: Failed opening required '/vendor/composer/../guzzlehttp/promises/src/functions_include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /vendor/composer/autoload_real.php:39
Stack trace:
#0 /vendor/composer/autoload_real.php(43): {closure}()
#1 /vendor/autoload.php(22): ComposerAutoloaderInit0248fdf029b8abd0ce3787652580d175::getLoader()
#2 phar:///usr/bin/phpstan/bin/phpstan(49): require_once('...')
#3 phar:///usr/bin/phpstan/bin/phpstan(110): _PHPStan_88a9c7bcc{closure}()
#4 /usr/bin/phpstan(7): require('...')
#5 {main}
thrown in /vendor/composer/autoload_real.php on line 39
Fatal error: Uncaught Error: Failed opening required '/vendor/composer/../guzzlehttp/promises/src/functions_include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /vendor/composer/autoload_real.php:39
Stack trace:
#0 /vendor/composer/autoload_real.php(43): {closure}()
#1 /vendor/autoload.php(22): ComposerAutoloaderInit0248fdf029b8abd0ce3787652580d175::getLoader()
#2 phar:///usr/bin/phpstan/bin/phpstan(49): require_once('...')
#3 phar:///usr/bin/phpstan/bin/phpstan(110): _PHPStan_88a9c7bcc{closure}()
#4 /usr/bin/phpstan(7): require('...')
#5 {main}
thrown in /vendor/composer/autoload_real.php on line 39


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Akhill2020
Akhill2020 requested a review from rosinghal August 6, 2026 12:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@includes/calendars/views/default-calendar-grid.php`:
- Around line 532-534: Remove or gate the Event schema markup generated by the
event loops in includes/calendars/views/default-calendar-grid.php lines 532-534
and includes/calendars/views/default-calendar-list.php lines 683-687 so it is
emitted only when the view represents a unique event-detail page, not
multi-event calendar pages. Publish the metadata on dedicated event-detail URLs
when available; both listed sites require the same change.

In `@includes/events/event-builder.php`:
- Around line 1314-1325: Remove the site icon and custom logo fallback logic
from the event image builder, including the get_site_icon_url and custom_logo
handling. When no event-specific image exists, return no image value so the
event schema omits image rather than emitting site branding.
- Around line 1409-1437: Update get_schema_offers_meta to emit no Offer markup
unless the event model provides verified ticket price, availability,
ticket-purchase URL, and sales-start data. Remove the current unconditional
defaults and event-start fallback; return an empty string until those ticket
fields are present, then populate the Offer properties from the verified values.
- Around line 1378-1396: Update the performer metadata method around the
organizer and site-name fallback logic to return no performer markup unless
actual performer data is provided by the event source. Remove the
organizer-derived Person output and the site-name-derived Organization fallback,
leaving unrelated event metadata behavior unchanged.
- Around line 1174-1177: Update all event structured-data startDate and endDate
emitters in includes/events/event-builder.php, including lines 1174-1177 and
854-858, to use date-only toDateString() values when $event->whole_day is true;
retain toIso8601String() for timed events and ensure both existing whole-day
startDate emitters follow the same behavior.
- Around line 1345-1347: Update the organizer metadata generation near the
organizer email branch so the email meta tag is emitted only when the calendar
owner’s explicit public organizer-email setting is enabled. Otherwise omit the
tag entirely, preserving the existing organizer data handling.
- Around line 1207-1223: Update get_schema_attendance_mode() to evaluate both
the physical location and virtual event URL before returning. Return
https://schema.org/MixedEventAttendanceMode when both conditions are present,
while preserving the existing online-only and offline fallback behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f901ef8-cabb-4095-a6ed-8bdf5d9e7276

📥 Commits

Reviewing files that changed from the base of the PR and between f9d1789 and 0a0db33.

📒 Files selected for processing (4)
  • includes/abstracts/calendar.php
  • includes/calendars/views/default-calendar-grid.php
  • includes/calendars/views/default-calendar-list.php
  • includes/events/event-builder.php

Comment thread includes/calendars/views/default-calendar-grid.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment on lines +1207 to +1223
private function get_schema_attendance_mode()
{
$location = !empty($this->event->start_location['address'])
? $this->event->start_location['address']
: '';

if (!empty($location)) {
return 'https://schema.org/OfflineEventAttendanceMode';
}

$link = !empty($this->event->link) ? $this->event->link : '';
if ($this->is_virtual_event_url($link)) {
return 'https://schema.org/OnlineEventAttendanceMode';
}

return 'https://schema.org/OfflineEventAttendanceMode';
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Return mixed attendance mode for hybrid events.

The physical-location branch returns OfflineEventAttendanceMode before the virtual-link check. An event with both values is therefore marked offline instead of mixed.

Check both conditions before returning a mode. Schema.org defines MixedEventAttendanceMode for events with online and offline attendance. (schema.org)

Proposed fix
-	if (!empty($location)) {
-		return 'https://schema.org/OfflineEventAttendanceMode';
-	}
-
 	$link = !empty($this->event->link) ? $this->event->link : '';
-	if ($this->is_virtual_event_url($link)) {
+	$has_location = !empty($location);
+	$has_virtual_location = $this->is_virtual_event_url($link);
+
+	if ($has_location && $has_virtual_location) {
+		return 'https://schema.org/MixedEventAttendanceMode';
+	}
+	if ($has_virtual_location) {
 		return 'https://schema.org/OnlineEventAttendanceMode';
 	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private function get_schema_attendance_mode()
{
$location = !empty($this->event->start_location['address'])
? $this->event->start_location['address']
: '';
if (!empty($location)) {
return 'https://schema.org/OfflineEventAttendanceMode';
}
$link = !empty($this->event->link) ? $this->event->link : '';
if ($this->is_virtual_event_url($link)) {
return 'https://schema.org/OnlineEventAttendanceMode';
}
return 'https://schema.org/OfflineEventAttendanceMode';
}
private function get_schema_attendance_mode()
{
$location = !empty($this->event->start_location['address'])
? $this->event->start_location['address']
: '';
$link = !empty($this->event->link) ? $this->event->link : '';
$has_location = !empty($location);
$has_virtual_location = $this->is_virtual_event_url($link);
if ($has_location && $has_virtual_location) {
return 'https://schema.org/MixedEventAttendanceMode';
}
if ($has_virtual_location) {
return 'https://schema.org/OnlineEventAttendanceMode';
}
return 'https://schema.org/OfflineEventAttendanceMode';
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@includes/events/event-builder.php` around lines 1207 - 1223, Update
get_schema_attendance_mode() to evaluate both the physical location and virtual
event URL before returning. Return https://schema.org/MixedEventAttendanceMode
when both conditions are present, while preserving the existing online-only and
offline fallback behavior.

Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated
Comment thread includes/events/event-builder.php Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@includes/events/event-schema.php`:
- Line 1: Run the repository’s configured Prettier formatter on the
event-schema.php file and commit the resulting formatting-only changes,
preserving its behavior.
- Around line 193-205: Remove the site-icon and custom-logo fallbacks from the
event image resolution so events without a source-provided image return no
image. Update the offer handling around get_verified_event_offer() to discard
incomplete or invalid source offers rather than defaulting missing ticket data
to price 0; emit a zero-price offer only when the source explicitly marks the
event as free.
- Around line 91-102: Update the event attendance mode logic to evaluate both
the physical address and recognized virtual URL before returning. In the flow
using $location and $link, return https://schema.org/MixedEventAttendanceMode
when both are present, while preserving OnlineEventAttendanceMode for
virtual-only events and OfflineEventAttendanceMode for physical-only or
otherwise offline events.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 73f1391b-82cc-4cb8-80c1-7eab3c4b681c

📥 Commits

Reviewing files that changed from the base of the PR and between 0a0db33 and 31f38b1.

📒 Files selected for processing (3)
  • includes/abstracts/calendar.php
  • includes/events/event-builder.php
  • includes/events/event-schema.php
💤 Files with no reviewable changes (1)
  • includes/events/event-builder.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • includes/abstracts/calendar.php

@@ -0,0 +1,487 @@
<?php

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Apply the repository formatter.

The build Prettier check fails for this file. Run Prettier and commit the formatted output.

🧰 Tools
🪛 GitHub Actions: build / 1_lint.txt

[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.

🪛 GitHub Actions: build / lint

[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@includes/events/event-schema.php` at line 1, Run the repository’s configured
Prettier formatter on the event-schema.php file and commit the resulting
formatting-only changes, preserving its behavior.

Source: Pipeline failures

Comment on lines +91 to +102
$location = !empty($this->event->start_location['address']) ? $this->event->start_location['address'] : '';

if (!empty($location)) {
return 'https://schema.org/OfflineEventAttendanceMode';
}

$link = !empty($this->event->link) ? $this->event->link : '';
if ($this->is_virtual_event_url($link)) {
return 'https://schema.org/OnlineEventAttendanceMode';
}

return 'https://schema.org/OfflineEventAttendanceMode';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files matching event-schema.php:"
fd -a 'event-schema\.php$' . || true

echo
echo "Relevant file excerpts:"
file="$(fd 'event-schema\.php$' . | head -n 1)"
if [ -n "${file:-}" ]; then
  wc -l "$file"
  sed -n '70,115p' "$file" | cat -n
  echo
  echo "Definitions/usages around hybrid logic:"
  rg -n "get_schema_attendance_mode|is_virtual_event_url|OfflineEventAttendanceMode|MixedEventAttendanceMode|OnlineEventAttendanceMode|start_location|link" -C 3 "$file"
fi

echo
echo "Schema docs references in repo:"
rg -n "MixedEventAttendanceMode|OfflineEventAttendanceMode|OnlineEventAttendanceMode" .

Repository: Xtendify/Simple-Calendar

Length of output: 3507


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files matching event-schema.php:"
git ls-files | grep 'event-schema\.php$' || true

echo
echo "Relevant file excerpts:"
file="$(git ls-files | grep 'event-schema\.php$' | head -n 1)"
if [ -n "${file:-}" ]; then
  wc -l "$file"
  sed -n '70,115p' "$file" | cat -n
  echo
  echo "Definitions/usages around hybrid logic:"
  rg -n "get_schema_attendance_mode|is_virtual_event_url|OfflineEventAttendanceMode|MixedEventAttendanceMode|OnlineEventAttendanceMode|start_location|link" -C 3 "$file"
fi

echo
echo "Schema attendance mode references in repo:"
rg -n "MixedEventAttendanceMode|OfflineEventAttendanceMode|OnlineEventAttendanceMode" . || true

Repository: Xtendify/Simple-Calendar

Length of output: 3497


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="includes/events/event-schema.php"
if [ ! -f "$file" ]; then
  echo "Error: includes/events/event-schema.php not found"
  exit 0
fi

python3 - <<'PY'
from pathlib import Path
text = Path("includes/events/event-schema.php").read_text()
# Extract the block that starts with the location variable in get_schema_attendance_mode
start_marker = "\t\t$location = !empty($this->event->start_location['address']) ? $this->event->start_location['address'] : '';"
idx = text.find(start_marker)
if idx == -1:
    print("start_marker_not_found")
else:
    end_idx = text.find("\t}", idx)
    block = text[idx:end_idx+3] if end_idx != -1 else text[idx:end_idx+60]
    lines = block.splitlines()
    for i,line in enumerate(lines, 1):
        print(f"{i}: {line.rstrip()}")
    print()
    # Simulate the block's return choices for representative inputs.
    # Use Python booleans without evaluating PHP helpers: is_virtual is True only for link that matches
    # one of the named virtual URL patterns in is_virtual_event_url().
    def simulate(location_address, link, is_virtual):
        if location_address:
            return 'OfflineEventAttendanceMode'
        if is_virtual:
            return 'OnlineEventAttendanceMode'
        return 'OfflineEventAttendanceMode'
    cases = [
        ("123 Main St", "https://zoom.us/j/123456", True),
        ("", "https://zoom.us/j/123456", True),
        ("", "", False),
        ("123 Main St", "", False),
    ]
    print("current branch simulation:")
    for location, link, virtual in cases:
        print(location, link, "is_virtual:", virtual, "=>", simulate(location, link, virtual))
PY

Repository: Xtendify/Simple-Calendar

Length of output: 673


Return MixedEventAttendanceMode for hybrid events.

If the event has both a physical address and a recognized virtual meeting URL, set eventAttendanceMode to https://schema.org/MixedEventAttendanceMode. The current logic returns OfflineEventAttendanceMode before checking link, so hybrid events are marked offline-only.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@includes/events/event-schema.php` around lines 91 - 102, Update the event
attendance mode logic to evaluate both the physical address and recognized
virtual URL before returning. In the flow using $location and $link, return
https://schema.org/MixedEventAttendanceMode when both are present, while
preserving OnlineEventAttendanceMode for virtual-only events and
OfflineEventAttendanceMode for physical-only or otherwise offline events.

Comment on lines +193 to +205
$site_icon = get_site_icon_url(512);
if (!empty($site_icon)) {
return esc_url_raw($site_icon);
}

$custom_logo_id = get_theme_mod('custom_logo');
if ($custom_logo_id) {
$logo_url = wp_get_attachment_image_url($custom_logo_id, 'full');
if (!empty($logo_url)) {
return esc_url_raw($logo_url);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not invent event images or free offers.

Lines 193-205 use the site icon or logo when the event has no image. Those assets do not describe the event. Lines 356-362 convert incomplete ticket data into a free offer. For example, a paid offer without validFrom is discarded by get_verified_event_offer() and then emitted with price 0.

Return no image or offer when the event source does not provide valid data. Emit a zero-price offer only when the source explicitly declares the event free.

Also applies to: 354-413

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@includes/events/event-schema.php` around lines 193 - 205, Remove the
site-icon and custom-logo fallbacks from the event image resolution so events
without a source-provided image return no image. Update the offer handling
around get_verified_event_offer() to discard incomplete or invalid source offers
rather than defaulting missing ticket data to price 0; emit a zero-price offer
only when the source explicitly marks the event as free.

@Akhill2020
Akhill2020 requested a review from rosinghal August 11, 2026 10:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@includes/events/event-schema.php`:
- Line 136: Update the virtual-host comparison in the host detection logic to
correctly match subdomains such as tenant.zoom.us against the configured virtual
host zoom.us, avoiding the current incorrect positive substring offset. Preserve
the exact-host match and ensure only the virtual host itself or a dot-delimited
suffix match is accepted.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e0b096c7-68c9-455a-a01e-20965ba8fab0

📥 Commits

Reviewing files that changed from the base of the PR and between 31f38b1 and ceb966e.

📒 Files selected for processing (5)
  • includes/abstracts/calendar.php
  • includes/calendars/views/default-calendar-grid.php
  • includes/calendars/views/default-calendar-list.php
  • includes/events/event-builder.php
  • includes/events/event-schema.php
🚧 Files skipped from review as they are similar to previous changes (3)
  • includes/calendars/views/default-calendar-list.php
  • includes/abstracts/calendar.php
  • includes/events/event-builder.php

];

foreach ($virtual_hosts as $virtual_host) {
if ($host === $virtual_host || substr($host, -(1 - strlen($virtual_host))) === '.' . $virtual_host) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix virtual-host suffix detection.

Line 136 computes a positive offset. A URL such as https://tenant.zoom.us/... does not match zoom.us. The event is then marked offline instead of online or mixed.

Proposed fix
-			if ($host === $virtual_host || substr($host, -(1 - strlen($virtual_host))) === '.' . $virtual_host) {
+			if ($host === $virtual_host || substr($host, -strlen('.' . $virtual_host)) === '.' . $virtual_host) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if ($host === $virtual_host || substr($host, -(1 - strlen($virtual_host))) === '.' . $virtual_host) {
if ($host === $virtual_host || substr($host, -strlen('.' . $virtual_host)) === '.' . $virtual_host) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@includes/events/event-schema.php` at line 136, Update the virtual-host
comparison in the host detection logic to correctly match subdomains such as
tenant.zoom.us against the configured virtual host zoom.us, avoiding the current
incorrect positive substring offset. Preserve the exact-host match and ensure
only the virtual host itself or a dot-delimited suffix match is accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants