Warning: Failed opening file box_cookie_notice.inc.php

Developer
Tól től Slovak Republic
Tagság ápr. 2023 óta

Hello Litecart team,

Thank for your amazing work. I try to create a shop starting with a new template design. I followed the instruction on page How To Create A LiteCart Template and according the step 2 I cleared the content of directories pages and views. Now I get the following warning:

Warning: include(/var/www/includes/templates/my.catalog/views/box_cookie_notice.inc.php): failed to open stream: No such file or directory in ~/includes/templates/my.catalog/layouts/default.inc.php (Line 35) Warning: include(): Failed opening '/var/www/includes/templates/my.catalog/views/box_cookie_notice.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in ~/includes/templates/my.catalog/layouts/default.inc.php (Line 35)

As I read, the litecart should look for the file to the default catalog, if there is no such file in the new template. Doing something wrong or it is a bug?

Litecart version 2.5.4
PHP version: 7.4.33
Web server: nginx 1.21.5

Thank for your help

tim
Founder
Tól től Sweden
Tagság máj. 2013 óta
tim

Hi, thank you for reporting. Indeed this file is a deviation as it is included directly in the layout without passing through any view processing. It will be sorted out in a future version. Can you meantime copy the file from [b]default.catalog[/b]/views/box_cookie_notice.inc.php to [b]my.catalog[/b]/views/box_cookie_notice.inc.php?

Update: A fix has been committed.
https://github.com/litecart/litecart/commit/ccf6d12eb7b141b3498a4c640a4212871780102c

Developer
Tól től Slovak Republic
Tagság ápr. 2023 óta

Thank you Tim for quick response. In meantime I found the same issue with the file box_product.inc.php. After copying both files into the new template it works fine.

Moderator
Tól től United States
Tagság okt. 2019 óta

@tim  I thought I remember you telling me awhile ago that we didn't need to copy all the files into to our custom catalog directory — if a file wasn't found in the custom dir, the one from default would be used automatically.  

Am I remembering incorrectly, or have things changed over time?

tim
Founder
Tól től Sweden
Tagság máj. 2013 óta
tim

This is still the case but there is a deviation for these two files. One was sorted out with the commit above.

Te
Ez a weboldal nem használ cookie-kat és nem használ harmadik féltől származó nyomkövetési technológiát. Úgy gondoljuk, hogy jobban tudjuk csinálni, mint mások, és tényleg gondolunk az Ön magánéletére.