Giter Club home page Giter Club logo

lscache_prestashop's People

Contributors

litespeedtech avatar mathiasreker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lscache_prestashop's Issues

Just a warning, maybe nothing

File: \lscache_prestashop\thirdparty\LscIntegration.php > Line 99: [Warning] Nested by-reference foreach loop, make sure that array modifications (if any) do what you expect foreach ($js as $key2 => &$js2) { }

Array to string conversion

Message:
Array to string conversion

Location:
modules/litespeedcache/classes/Cache.php line 501

#0 modules/litespeedcache/classes/Cache.php(501)
#1 modules/litespeedcache/classes/Cache.php(588): LiteSpeedCacheCore->getPurgeTagsByCategory(Category#1)
#2 modules/litespeedcache/classes/Cache.php(511): LiteSpeedCacheCore->getPurgeTagsByHookMethod("hookactionCategoryUpdate", array(4))
#3 modules/litespeedcache/litespeedcache.php(302): LiteSpeedCacheCore->purgeByCatchAllMethod("hookactionCategoryUpdate", array(4))
#4 classes/Hook.php(744): LiteSpeedCache->__call("hookactionCategoryUpdate", array(4))
#5 override/classes/Hook.php(43): HookCore::coreCallHook(LiteSpeedCache#1, "hookactionCategoryUpdate", array(4))
#6 classes/Hook.php(458): Hook::coreCallHook(LiteSpeedCache#1, "hookactionCategoryUpdate", array(4))
#7 classes/Hook.php(282): HookCore::execWithoutCache("actionCategoryUpdate", array(4), null, false, true, false, null)
#8 classes/Category.php(1458): HookCore::exec("actionCategoryUpdate", array(1))
#9 classes/controller/AdminController.php(1292): CategoryCore->update()
#10 classes/controller/AdminController.php(1249): AdminControllerCore->processUpdate()
#11 classes/controller/AdminController.php(601): AdminControllerCore->processSave()
#12 controllers/admin/AdminCategoriesController.php(807): AdminControllerCore->postProcess()
#13 classes/controller/Controller.php(191): AdminCategoriesControllerCore->postProcess()
#14 classes/Dispatcher.php(851): ControllerCore->run()
#15 adminXXXX/index.php(58): DispatcherCore->dispatch()

Undefined array key "product"

Hi,

I am writing a new program that can sync new products to Prestashop, but unfortunately I am running into an error.

When adding a new product via the webservice of Prestashop with cache enabled, I get the following XML error response:
<error> <code><![CDATA[3]]></code> <message><![CDATA[[PHP Warning #2] Undefined array key "product" (/<dir1>/<dir2>/<dir3>/<domain_name>/public_html/modules/litespeedcache/classes/Cache.php, line 565)]]></message> </error>

The product is successfully created, so the request is not malformed or anything. When manually disabling the cache, the server does not return an HTTP 500, but instead returns a HTTP 200.

Could you please take a look into this issue?
If you need more details, please ask.

Kind regards,
Roy

Wrong cache if customer is in several customer groups

Dear all

Thank you for this amazing module. We are using it and have been happy with it till recently.

We noticed that there are issues with wrong caches delivered if you work with several customer groups for discounting purposes etc.

example:
User JohnDoe is in group A + C + D
User JaneDoe is in group B + C + E

we noticed that it can happen that Jane Doe (gr. B) might see discounts applied from JohnDoe (gr. A) since they got served by the same customer group 'C'.

We did not have this issue with other caching modules which provide an additional option to generate cache according to all selected customer groups.

I hope I was able to explain myself.

--- edit

without any further knowledge of the internals of this module I assume that the issue might be related to the follow lines:

if ($diffCustomerGroup != 0 && $context->customer->isLogged()) {
// 1: every group, 2: inout
if ($diffCustomerGroup == 1) {
$data['cg'] = $context->customer->getGroups()[0];
} else {
$data['cg'] = 1;
}
}

Maybe a simple adjustment like the following line might solve the issue?

...
$data['cg'] = implode('-',$context->customer->getGroups());
...

If this fixes the problem we might think about the order of the returned ids. E.g. like in our case we have a lot of customers with the same "group configuration" but the order when those groups were applied might differ from customer to customer (for example: JohnDoe got discout group C [assigned groups = ACD] directly applied after the registration but JaneDoe got group C after 1 one year when she reached a certain turn over [assigned groups = ADC])...

BR wucherpfennig

Error: Call to a member function getParam() on string

Message:
Error: Call to a member function getParam() on string

Location:
modules/litespeedcache/controllers/front/esi.php line 94

STACKTRACE
#0 modules/litespeedcache/controllers/front/esi.php(94)
#1 modules/litespeedcache/controllers/front/esi.php(61): LiteSpeedCacheEsiModuleFrontController->populateItemContent("missing pd : ")
#2 classes/controller/Controller.php(227): LiteSpeedCacheEsiModuleFrontController->display()
#3 classes/controller/FrontController.php(264): ControllerCore->run()
#4 classes/Dispatcher.php(854): FrontControllerCore->run()
#5 index.php(33): DispatcherCore->dispatch()

Missing Menu on Thirtybees 1.1.0

Hello,

I'm testing your PS module for TB which is a fork of 1.6 branch.

Two days it was running without errors or glitches and today I'm up to my site missing it's vertical menu.

I'm using Warehouse theme and the settings in my Litespeed cache module are as follows:

No
No - everyone shares same view
Always flush products and categories
First page only - here I will change with No default view. - the description in this section is confusing, I can't handle what each of the settings do.

Thanks!

Since on Litspeed prestashop module updates not working

Hello,

We have purchased a premium Litespeed license. Since on it, the prestashop 1.7.2.2 module update GET fetch that notifies you of shop updates is not working anymore.

Any idea if there is a conflict between litespeed and this url please?
index.php/improve/modules/addons/login?_token=

Or if perhaps there is a setting that could adjust this fetch within the litespeed module?

Thank you.

Brakes the view of page

After module installation it adds a code "<esi:inline..." before the tag what brakes the view of page and code validity. Here is the screenshot of source code https://take.ms/U7Rzn
Tested out on latest stable release Prestashop 1.7.6.8 with Classic theme running in docker on openlitespeed:1.6.15-lsphp73

few improvements

/litespeedcache.php

        The use of function stripslashes() is forbidden; use Tools::stripslashes() instead

        424.
            ························$id·=·stripslashes($id);

                                $lsc = self::myInstance();
                                if (!isset($lsc->esiInjection['marker'][$id])) {
                                    $id = stripslashes($id);
                                }
                                if (!isset($lsc->esiInjection['marker'][$id])) {
                                    // should not happen

/classes/Cache.php

        Multi-line function call not indented correctly; expected 20 spaces but found 24

        337.
            ························$product['product_id'], 
        347.
            ························$pubtags, 

        Multi-line function call not indented correctly; expected 16 spaces but found 24

        338.
            ························$includeCats); 
        348.
            ························$this->config->getDefaultPurgeTagsByProduct()); 

        Closing parenthesis of a multi-line function call must be on a line by itself

        338.
            ························$includeCats); 
        348.
            ························$this->config->getDefaultPurgeTagsByProduct()); 

Admin is always cached.

Hi everyone,

My Admin is always cached which prompts me to always clear the lscache when working.

Can somebody help me with the right .htaccess configuration for lscache?
I have tried different configurations, but non of them seems to work.

This is the configuration I'm using at the moment:

RewriteEngine On RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ RewriteCond %{HTTP_HOST} ^mydomain.com [NC] [OR] RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteRule .* - [E=Cache-Control:max-age=120]

RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{HTTP_HOST} ^https://mydomain.com/admin$ [NC]
RewriteCond %{HTTP_HOST} ^https://mydomain.com/admin/index.php/configure/advanced/performance$ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
CacheLookup on
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !PrestaShop-
RewriteRule .* - [E=Cache-Control:vary=guest]

LITESPEED_CACHE_END

Thanks a lot.

Update compatibility

Hello all,
I'm wondering if this project is still maintained. The latest module version in dated 2020 and won't install/work on the latest versions of Prestashop (PS1.7.8+ and PS8+). Any chance to get this working again?

Cache for desktop and mobile

Hi everyone,

cache for desktop/tablet/mobile is the same.
For any device - Crawler always chooses desktop version to cache.

Prestashop 1.7.8.0, PHP 7.4

PHP Fatal error: Uncaught Error: Call to a member function query()

It is very unstable, it generates 500 random errors, problem detected in Prestashop 1.6.x and 1.7.x

2021-05-31 02:00:46.426075 [NOTICE] [11712] [186.83.234.62:47870:HTTP2-65#APVH_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com:443] [STDERR] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/DbPDO.php:165 Stack trace: #0 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(376): DbPDOCore->_query('\n\t\t\tSELECTiso...')
#1 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(663): DbCore->query('\n\t\t\tSELECT iso...') #2 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(697): DbCore->getRow('\n\t\t\tSELECT iso...', true)
#3 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/Country.php(274): DbCore->getValue('\n\t\t\tSELECT iso...') #4 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/modules/litespeedcache/classes/VaryCookie.php(234): CountryCore::getIsoById(6) #5 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/modules/litespeedcache/classes/VaryCookie.php(76): LiteSpee in /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/DbPDO.php on line 165 2021-05-31 02:04:15.721202 [NOTICE] [11712] [66.249.66.77:38770-2#APVH_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com:443] [STDERR] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/DbPDO.php:165 Stack trace: #0 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(376): DbPDOCore->_query('\n\t\t\tSELECT iso...')
#1 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(663): DbCore->query('\n\t\t\tSELECT iso...') #2 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/Db.php(697): DbCore->getRow('\n\t\t\tSELECT iso...', true)
#3 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/Country.php(274): DbCore->getValue('\n\t\t\tSELECT `iso...')
#4 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/modules/litespeedcache/classes/VaryCookie.php(234): CountryCore::getIsoById(6)
#5 /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/modules/litespeedcache/classes/VaryCookie.php(76): LiteSpee in /var/www/vhosts/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com/httpdocs/classes/db/DbPDO.php on line
165

`

php8.1 and later compatibility

Today I tried running my shops on php8.1 but the module is pumping lots of deprecetions.

image

Any roadmap for support of the latest php versions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.