D
D
Dmitry2017-04-13 09:47:32
1C-Bitrix
Dmitry, 2017-04-13 09:47:32

JCCatalogElement not found in product card?

Hello!
There was a problem in the classic Bitrix theme eshop_bootstrap_blue.
An error occurs in the product card in the console:
Uncaught ReferenceError: JCCatalogElement is not defined
Everything worked, I reset the cache and everything went wrong, and not all css are loaded either.
What could be causing the problem? Didn't make any edits to the thread.
I realized the problem is not loading files:
/bitrix/components/bitrix/catalog.element/templates/.default/script.js
What is the reason for this? I checked the rights everything is ok.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Q
qnok, 2018-08-15
@qnok

Although almost a year has passed, I have a possible solution for others looking for.
In my case, it was the error Uncaught TypeError: Cannot read property 'prototype' of undefined at Function.BX.extend
followed by errors like: Uncaught ReferenceError: JCCatalogTopSection is not defined
Almost the same thing - the purchase button through Bitrix scripts stops working.
Reason: one of the Bitrix javascript libraries was not loaded. There may be several reasons, for example, the library call code was in the cached area.
Specifically, in my case, the PHP script helped:

// Запускать скрипт надо перед вызовом компонента, в котором возникает ошибка (или в хеадере, если точно будет исопльзование данной библиотеки на всем сайте)
    CJSCore::Init(array('popup'));

Another solution:
enabling ajax mode in the component
"AJAX_MODE" => "Y"
If this does not help, then you can connect some of the listed libraries
// Методом исключений можно оставить только необходимые
    CJSCore::Init(array('ajax', 'json', 'ls', 'session', 'jquery', 'popup', 'pull'));

A
alexdev1990, 2020-11-06
@alexdev1990

There was the same error. Disabling CDN helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question