Navigating to Catalog or Manage Room Type lands on blank page.



  • I've just completed my first installation of Qlo and have added a hotel. Now I'm trying to add rooms to that hotel, but navigating to Catalog or Manage Room Type lands on blank page. The html reveals a pairs of HTML, head, and body tags, but nothing more. The network tab reveals that I'm getting a 500 from the web server on these pages. Unsure how to repair this, as this install is only a few minutes old. I am a web developer, so please feel free to talk nerdy to me.


  • Global Moderator

    Hi @HeartValley

    First, we have to check the errors occurring on that page, for that please enable dev mode by editing file at path
    hotelcommerce/config/defines.inc.php
    change _PS_MODE_DEV_ to true and provide us the errors

    if (!defined('_PS_MODE_DEV_')) {
    define('_PS_MODE_DEV_', true);
    }
    


  • Thank you. The error output is as follows:

    Warning: Use of undefined constant _RIJNDAEL_KEY_ - assumed '_RIJNDAEL_KEY_' (this will throw an Error in a future version of PHP) in /home/hearqyad/public_html/reservations/classes/Cookie.php on line 79
    
    Warning: Use of undefined constant _RIJNDAEL_IV_ - assumed '_RIJNDAEL_IV_' (this will throw an Error in a future version of PHP) in /home/hearqyad/public_html/reservations/classes/Cookie.php on line 79
    
    Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /home/hearqyad/public_html/reservations/classes/Rijndael.php on line 124
    
    Warning: openssl_decrypt(): IV passed is only 7 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /home/hearqyad/public_html/reservations/classes/Rijndael.php on line 91
    
    Parse error: syntax error, unexpected end of file in /home/hearqyad/public_html/reservations/controllers/admin/AdminProductsController.php on line 3735
    


  • Ahh, I forgot I was unable to figure out how to install mcrypt on my commercial webhost. Is there a guide to doing this? Specifically I'm hosted with namecheap.com


  • Global Moderator

    @HeartValley

    From the logs it looks like issue is occurring in file
    hotelcommerce/controllers/admin/AdminProductsController.php at line 3735;
    Please provide us the version of QloApps you are using to figure out where the error is comming from

    also the mcrypt warning is occuring beacuse mycrypt is deprecated in PHP 7.1
    https://serverpilot.io/docs/how-to-install-the-php-mcrypt-extension/



  • @shreesh, thank you for your reply.
    I've just downloaded and installed it fresh, so I'm using the latest version, 1.4.1. This code block is where the error lies, with the specific error being the second line of this snippet.

            foreach ($attributes as $attribute) {
                $combinations[$attribute['id_product_attribute']]['id_product_attribute'] = $attribute['id_product_attribute'];
                if (!isset($combinations[$attribute['id_product_attribute']]['attributes'])) {
                    $combinations[$attribute['id_product_attribute']]['attributes'] = '';
                }
                $combinations[$attribute['id_product_attribute']]['attributes'] .= $attribute['attribute_name'].' - ';
    
                $combinations[$attribute['id_product_attribute']]['price'] = Tools::displayPrice(
                    Tools::convertPrice(
                        Product::getPriceStatic((int)$obj->id, false, $attribute['id_product_attribute']),
                        $this->context->currency
                    ), $this->context->currency
                );
            }


  • Removing the code block has allowed me to access the page, with errors. This has allowed me to advance to the point where I am able to add a room type, but I can not complete the room creation because adding anything to the configuration tab results in a modal displaying error:

    Unknown error on line 2151 in file /classes/Tools.php
    [8192] Function create_function() is deprecated
    

    the line in question in tools.php reads:

    return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str);
    

  • Global Moderator

    Hi @HeartValley

    To look further debug this issue we need to access your server as we are unable to reproduce it.

    If you are using public domain to host QloApps, please raise a ticket at https://webkul.uvdesk.com/en/customer/create-ticket/
    And on the ticket please share your QloApps admin Credentials and FTP details so that we can look into the issue.