Skip to main content

Support Policy

We only provide official support for Solidres's subscribers, all subscribers can request support by using forum or support ticket system. For more information please check our Support Policy at www.solidres.com/support-policy

Solidres/Gantry compatibility issue – Booking, email and calendar failures

  • karim@tharwavalleyforge.com
  • Topic Author
  • Offline
More
6 days 17 hours ago #21860 by karim@tharwavalleyforge.com
Hi Solidres Team,

Following customer complaints regarding error screens when booking and confirmation emails not being received, we have identified a potential compatibility conflict between Solidres and Gantry following the recent Solidres updates. 

System environment
  • Joomla: 6.2.1
  • Solidres: 4.7.0 Stable
  • Gantry: 5.6.7
  • Template: Helium 5.6.7
Issue reproduction 
  • Accommodation, Reservation and Guest information pages function correctly.
  • An HTTP 500 error occurs when the booking confirmation page should be displayed. 
  • Reservations are recorded in the administrator, but not appearing in the booking calendar. 
  • Booking confirmation emails are not received.
  • Square payment redirection works. Finalisation following successful payment has not been tested. 
Technical Findings
  1. Exception and stack trace
    Affected request: reservation.finalize
    Error: UndefinedMethodError: Call to undefined method Twig\Extension\CoreExtension::getName()
    The exception originates in:
    libraries/gantry5/compat/vendor/twig/twig/src/Environment.php
    Line 965.
    The stack trace identified Solidres guest confirmation email generation as the point of failure, including calls to:
    - Reservation::sendEmail()
    - Reservation::sendGuestEmail()
    - BookingEmails::render()
    - GuestEmail::renderText()
    A secondary exception occurs when Gantry attempts to render the Joomla error page.
  2. Twig dependencies
    Inspection of the installed Composer dependencies confirmed the following versions:
    - Solidres: Twig 3.30.0
    - Gantry standard library: Twig 2.16.1
    - Gantry compatibility library: Twig 1.44.8
  3. Gantry code inspection 
    The following files were inspected: 
    - gantry5.php
    - Loader.php
    - RealLoader.php
    Gantry's RealLoader.php explicitly selects the compatibility libraries when running on Joomla with PHP 7.2.5 or newer.
    The Twig namespace is subsequently mapped to Gantry's compatibility vendor directory.
  4. Solidres code inspection 
    The loadLibraries() function in libraries/solidres/src/Mail/Twig.php checks whether Twig classes are already available before loading its own Composer dependencies.
    This appears to allow Solidres to use Twig classes provided by another extension without establishing version compatibility. 
    Additionally, the class_exists() check may trigger another extension's autoloader before Solidres registers its own dependencies. 
    The exception and stack trace strongly suggest that incompatible Twig classes are being loaded within the same request. 
Questions for the Solidres team:
  • Is this a known compatibility issue between the new Solidres email engine and Gantry 5?
  • Is there an existing patch or recommended temporary workaround?
  • Can the Solidres Twig dependencies be isolated to prevent conflicts with other Joomla extensions?
  • Could the failed reservation finalisation explain the missing booking calendar entries?
  • Could this issue also affect reservation finalisation following successful online payments?
No core files or vendor libraries have been modified.

As this affects a live booking system, we would appreciate urgent assistance.

We would prefer a supported resolution that remains compatible with future extension updates, rather than modifying core files or vendor libraries.

Thank you.

Please Log in or Create an account to join the conversation.

More
5 days 10 hours ago #21861 by solidres
Hi,

Thank you for the detailed report. Your analysis is right: this is a Solidres bug, not a Gantry one.

Since 4.7.0, Solidres checks whether the Twig library is already loaded before loading its own copy. On your site Gantry answered that check, so the email engine ran on a mix of Gantry's Twig 1.44 and Solidres' Twig 3.30, and failed.

- The bookings are saved. The error comes later, when the emails are sent, so the guest's confirmation and your notification are lost and the guest sees the error page.
- Square: the payment is recorded before the guest reaches the last step, so paid bookings are marked as paid. The guest still gets the same error and no email.
- Calendar: this is a separate issue. The availability calendar only counts bookings in the Confirmed status, so please check the status of those bookings in the administrator.

The fix will be in Solidres 4.9.0. Until then, the attached zip fixes your 4.7.0 site. It holds the two files we changed, libraries/solidres/src/Mail/Twig.php and libraries/solidres/src/Reservation/Reservation.php. Back up yours, upload these over them, then make a test booking; the text file in the zip has the steps. With them, Solidres loads its own copy of Twig, and an email that can't be sent no longer stops the booking from finishing.

The files are for 4.7.0 only, and updating Solidres replaces them. 4.9.0 includes the fix, so there is nothing to undo then. 4.8.0 doesn't include it yet, so if you update to 4.8.0 before 4.9.0 is out, let us know and we'll send you the same fix for 4.8.0.

Please Log in or Create an account to join the conversation.

Moderators: solidres

All the things you need to make your work easier. Did you like Solidres?