Hostaway / wordpress-plugin

Wordpress plugin by Hostaway.com
7 stars 1 forks source link

Plugin installation fails #2

Closed Alain1405 closed 4 years ago

Alain1405 commented 5 years ago

Wordpress 5.2.3 I Installed the plugin uploading the provided zip file but when I activate it I get the following:

Fatal error: Uncaught Twig\Error\RuntimeError: Key "city" does not exist as the array is empty. in /plugins_folder/wp-plugin/templates/search.html.twig.php:8 Stack trace: #0 /plugins_folder/wp-plugin/cache/twig/b9/b970b67c016cd36513d6ec44ab7907c908984f948d821f1d5dcf9dbe04bc533e.php(52): Twig\Template->getAttribute(Array, 'city', Array) #1 /plugins_folder/wp-plugin/vendor/twig/twig/src/Template.php(216): __TwigTemplate_c2309737a6711c654226fdfb0d0343732dfff63b582376ac9e5ec4dfe2f73a5d->block_content(Array, Array) #2 /plugins_folder/wp-plugin/cache/twig/a0/a07f3f9410b0c0eb0e58867299ca119259c1cf0c84e10d12a27469ba1ee7374e.php(44): Twig\Template->displayBlock('content', Array, Array) #3 /plugins_folder/wp-plugin/vendor/twig/twig/src/Template.php(443): __TwigTemplate_951b1e44484d758df3a51bdd4f31a78f602a2476adac640c1d1d7d0f06821795->doDisplay(Array, Array) #4 /home1/username/pub in /plugins_folder/wp-plugin/templates/search.html.twig.php on line 8
Alain1405 commented 5 years ago

Actually, Changing {% set cities = facets.city %} to {% set cities = ["cityname"] %} temporarily fixed it, allowing me to install and configure the plugin.

I have some questions though: 1) Do you plan to put the code on GitHub? I'd like to fork and make some changes (such as hide the "city" select menu). If not, do you mind if I do? 2) If I select some dates and hit search, the proper listings show up. If I click on a listing, however, the dates are not carried over the "Listing details page" and I have to select dates again. Do you plan to implement this? 3) When I reserve, no confirmation message is shown to the guest and no email is sent. Should I setup an automatic message from Hostaway or direct reservations should send something?

FYI, however, the "Hostaway Search Place" page was generated 16 times for some reason (I have 4 listings). I guess I can keep just one.

Screen Shot 2019-09-24 at 7 07 48 PM
Alain1405 commented 5 years ago

Also, the reservation I've made via the WordPress plugin is not cancelable on Hostaway.com (I've contacted support in this regard). I guess they should be treated as direct bookings and should be manageable from Hostaway portal.

vladimir-hostaway commented 5 years ago

@Alain1405 thank you for reporting bugs. We will fix them ASAP and let you know.

About opening repository - it is not yet decided, once it will be we will let you know :)

Have a good day!

Alain1405 commented 4 years ago

Hi @vladimir-hostaway , thanks for your reply. I've encountered some other issues in the implementation of the plugin. I have to go by memory because I've made some changes meanwhile:

bramchi commented 4 years ago

@Alain1405 Thanks for posting your fix. I encountered the same "city" key runtime error when trying to active the plugin, and changing that line as you suggested fixed it for me too. Btw, I had to clear the twig cache at /cache/twig to have it pick up the change properly.

vladimir-hostaway commented 4 years ago

@bramchi @Alain1405 we have released a newer version. Please try that - it should fix the issue