Troubleshooting guide

beatnbite edited this page Dec 11, 2012 · 27 revisions
Clone this wiki locally

LiteCommerce troubleshooting guide

[DocBlocks support] Check result - FAILED

The LiteCommerce installation wizard says that the web server is incompatible with LiteCommerce due to lack of the DocBlock support:

The DocBlock feature is not supported by your PHP. This feature is required
for the operation of LiteCommerce. The cause of blocking DocBlock feature
may be the eAccelerator extension. Disable this extension and try again.

Most likely this is because you have eAccelerator extension installed on your web server. This extension cuts PHP comments which many modern PHP applications (including LiteCommerce 3) use for storing extra information required for the program to run.

It is possible to force eAccelartor to not remove the comments: your webserver administrator has to re-compile it with the --with-eaccelerator-doc-comment-inclusion switch in the configure script.

"ERROR: -1 (code N/A) - Cache rebuild is already started, please wait"

Try to clean the classes cache as follows, refresh the page and wait until the script finishes the cache rebuilding process.

To clean the cache remove all files and directories beneath "<litecommerce>/var/run" directory, where <litecommerce> is the directory where your "stand-alone" LiteCommerce version is installed (or is the "modules/lc_connector/litecommerce" subdirectory of the directory where your Drupal-based website is installed).

"Fatal error: Allowed memory size of .... bytes exhausted" when rebuilding the LC classes cache

  1. Start editing the LiteCommerce settings file. For the stand-alone LC version it is <litecommerce-directory>/etc/config.php. For the Ecommerce CMS package including LC and Drupal 7 the path is <drupal-directory>/modules/lc_connector/litecommerce/etc/config.php.

  2. Find use_tokenizer = Off line in the [decorator] section, replace 'Off' with 'On' and save the file. That will switch to a cache rebuilding function (Tokenizer) that uses less memory, but is much slower that the default one (Reflections).

  3. Run the cache rebuilding process again

Memory usage with different installation profiles:

  • ~84M - Drupal + LC3, Reflections
  • ~64M - Drupal + LC3, Tokenizer
  • ~64M - LC3 stand-alone, Reflections
  • ~48M - LC3 stand-alone, Tokenizer

Installing additional modules may result into a higher memory consumption, that's why we recommend you to have at least 128MB as the "memory limit" setting for your web server.

"500 Internal Server Error" when installing the D7+LC3 package not into the web root

  1. Delete all the package files.

  2. Drop all Drupal and LiteCommerce tables from the MySQL database.

  3. Unpack the package files into a directory on the server.

  4. Edit .htaccess file in the directory and find a line that looks like # RewriteBase /.

  5. Add a new line with a correct RewriteBase rule. For example, if the directory is available in a browser at "http://www.yoursite.com/~user/shop/" you are to add the following line:

    RewriteBase /~user/shop
    
  6. Run the installation wizard in a browser.

The cache re-building process hangs on the "Doctrine_Plugin_UpdateSchema" plugin

Re-building cache [step 3 of 5], please wait...

Run the "Doctrine_Plugin_ProxyGenerator" plugin... [3.02sec, 10.4MB (9.3MB)]
Run the "Doctrine_Plugin_UpdateSchema" plugin...

Refreshing the page results into the "ERROR: -1" error message.

To get the ORM working LiteCommerce queries data from the "information_schema" system database. Selecting from this database is very slow on old MySQL versions (see http://bugs.mysql.com/bug.php?id=38918) that results into the above error on some computers.

Upgrading to a newer MySQL version (at least 5.1.31) should fix the problem.

Troubles with the account management in admin-zone.

I created the account in the LC users section when the disabled DrupalConnector module. After it I can't delete it from LC admin zone, it is not visible in the Drupal back-end, and it is impossible to create one more account with the same e-mail since the system says that this e-mail is already in use.

Try to synchronize LC and Drupal accounts:

  1. Go to the LC Connector module settings. This page is located under Modules -> LC Connector -> Configure or accessible by direct URL as <URL-to-Drupal>/admin/modules/lc_connector

  2. You should see the USER ACCOUNTS SYNCHRONIZATION section. Click the button 'Synchronize user accounts'

  3. Check the users section. Users which you created via LC admin interface should be listed in Drupal now.

After I added product to a bag I see 'X items in bag'. How to fix it?

This issue may be related with a specific configuration of gettext extension on your server. LiteCommerce may use other way to manage translations - via database. Open file /etc/config.php and find the option (this should be at the bottom of config file):

[other]
; Translation drive code - auto / gettext / db
translation_driver = auto

Replace 'auto' with 'db'. Then remove directory /var/locale

I cannot add the product in the bag

Symptom

You press the "Add to Bag" button on the product page, see the message, that the product has been successfully added, but the shopping cart is still empty.

Reason

Please, make sure, that you open the store via domain, specified in the http_host option in the "%lc_dir%/etc/config.php" file (%lc_dir% - the directory, where LiteCommerce is installed. By default in Ecommerce CMS it is available in the "litecommerce" directory in the Drupal folder). For example, if the config file contains these options:

    [host_details]
    http_host = "www.example.com"
    https_host = "www.example.com"
    web_dir = "/litecommerce"

and you open the product page via such URL:

http://example.com/store/product/0/product_id-1

(without "www.") you'll see the problem.

Solution

To avoid the problem one should redirect the customers on proper domain. In the example, described above, one should redirect the customers on this URL:

http://www.example.com/store/product/0/product_id-1

(with "www.") One can do it via ".htaccess" file. Have a look at: http://www.easymodrewrite.com/example-www http://www.thesitewizard.com/apache/redirect-domain-www-subdomain.shtml

If you find it difficult to do it yourself, please, contact our technical support group: http://www.litecommerce.com/support-service.html

I see "Dear X" and/or "Thank you for your order FOOTER" text in the e-mail messages

If you see such text in the e-mail notifications, it means, that there are no translations for these labels for the language, enabled in your store. It may happen if you translate the store yourself and forgot about these labels, or if the translation was removed for some reason.

To fix the problem one should visit the "Settings"->"Language labels" page in LC admin backend and create new labels:

  1. Dear X

It should have this value:

Dear {{firstname}} {{lastname}}!

  1. Thank you for your order FOOTER

With this value:

Thank you for your order made with our shopping system.<br />Please come back soon!

How to get the hard reset and soft reset links?

During upgrade LiteCommerce generates 2 links:

  • Hard reset link allows to disable all modules
  • Soft reset link disables the unsafe modules only

These links are sent to admin via e-mail and should be used if some module crashes the site after upgrade and it is necessary to disable it.

If you don't receive such e-mail message for some reason or cannot find it, you can obtain the hard reset and soft reset links by the following way:

Hard reset link:

http://domain/web_dir/admin.php?target=main&acces_key=KEY&safe_mode=1

Soft reset link:

http://domain/web_dir/admin.php?target=main&acces_key=KEY&safe_mode=1&soft_reset=1

Here:

  • domain - domain name of your site;
  • web_dir - web-directory, where your LiteCommerce is installed;
  • KEY - access_key;

You can find the access key in the "/var/data/.safeModeAccessKey" file on your server. Use FTP or SSH client software to download this file or Control Panel provided by your hosting. This file contains the access key and nothing else. So you should copy the text in this file, replace the KEY in the links, presented above, replace the 'domain' and 'web_dir' and use these links to disable all or unsafe modules in your store.

A couple of typical soft reset links are presented bellow:

http://www.example.com/litecommerce/admin.php?target=main&acces_key=5045a3f00a74e&safe_mode=1&soft_reset=1

http://www.example.org/admin.php?target=main&acces_key=fr4d7al80p4rd&safe_mode=1&soft_reset=1