G
G
Genev2015-07-03 12:33:27
1C-Bitrix
Genev, 2015-07-03 12:33:27

How to fix "Error Fatal error: Class 'CGuest' not found in (path)\init.php on line 185"?

Good day to all. The site on Bitrix is ​​functioning normally, but sometimes such an annoying error pops up.
The difficulty of solving the issue is that I have little experience in supporting sites. I would be grateful for help.

AddEventHandler("main", "OnBeforeEventAdd", array("CEventAdd", "OnBeforeEventAddHandler"));

class CEventAdd
{
    function OnBeforeEventAddHandler(&$event, &$lid, &$arFields)
    {
        if ($rs = CGuest::GetByID($_SESSION["SESS_GUEST_ID"])) // 185
        {
            $ar = $rs->Fetch();
            //echo ""; print_r($ar); echo "";
           $ar['FIRST_ADV_ID'];
           $ar['LAST_ADV_ID'];
           //еще много-много кода

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-07-03
@alexey-m-ukolov

Before using the CGuest class, you need to connect the web analytics module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question