Customer Portal

Get Involved. Join the Conversation.

Topic

    Mirela Iepure
    Fatal error "Class 'Custom\Widgets\chat\Url'...
    Topic posted May 13, 2015 by Mirela IepureBronze Medal: 1,250+ Points 
    783 Views, 26 Comments
    Title:
    Fatal error "Class 'Custom\Widgets\chat\Url' not found"
    Content:

    Hello,

    I created a new widget with chat function for our Technical Support team to answer the tech questions from customers. Unfortunately when I stage the changes made in Customer Portal I get this error:

    Fatal error: Class 'Custom\Widgets\chat\Url' not found in /cgi-bin/***.cfg/scripts/cp/generated/staging/staging_01/optimized/views/headers/home.php on line 1178 

    Can you help me make the changes where are needed so that the new chat widget could be functional?

    Thank you,
    Mirela

    Comment

    • Mirela Iepure

      Hi James,

      I deleted and recreated the widget from scratch. At the top of the controller.php is the following line:

      use RightNow\Utils\Url;

      When I stage all the changes in the templates and activate this new widget I don't get the error anymore, but unfortunately the whole chat part is not working, I mean even the actual widget is not shown up and the Site feedback link is not workinf either..

      when I deactivate the widget everything goes back to normal..

      I was wondering if the Ajax part and the Javascript part are the same as for the actual Chat widget or do I need to separate them?

      I am also concerned about the way the widget is called in the template. Should this be the same as in Conditional Chat widget's case? :

      <rn:condition config_check="MOD_CHAT_ENABLED == true">
                              <rn:widget path="custom/chat/ConditionalChatLink_custom" ignore_preroute="true" min_sessions_avail="1"/>
                          </rn:condition>

      Thank you,

      M.

    • Jeremy Watson

      Mirela,

      Unfortunately, it's hard to say at this point.  It's likely there's something in your custom widget that's interfering with other widgets, if SiteFeedback is also failing.

      Rather than stage your changes, I would first verify that you can get everything working in development mode.  It will be far easier to debug JS issues in development mode with the unoptimized JavaScript files.

      James

    • Mirela Iepure

      Hi James,

      I am still new to all this Oracle RightNow. Can you tell me please how to verify and get everything working in development mode and see if all the JavaScript files are ok?

      What concerns me is that in the second Chat widget I get these items doubled:

      Fired Events

      • evt_CCLReady); RightNow.Event.subscribe(evt_isCCLReady
      • evt_CCLReady); }
      • evt_CCLReady); RightNow.Event.subscribe(evt_isCCLReady
      • evt_CCLReady); }
      • evt_chatQueueRequest

      Subscribed Events

      • evt_customInitialization
      • evt_isCCLReady
      • evt_customInitialization
      • evt_isCCLReady
      • evt_chatQueueResponseCCL

      And in the ConditionalChatLink widget they are just simple:

      Fired Events

      • evt_CCLReady); RightNow.Event.subscribe(evt_isCCLReady
      • evt_CCLReady); }
      • evt_chatQueueRequest

      Subscribed Events

      • evt_customInitialization
      • evt_isCCLReady
      • evt_chatQueueResponseCCL

      Thank you,
      M.

    • ilamukky

      Hello Mirela, did you solved this issue? I encountered the same errror after deployment of cP3:

      Fatal error: Class 'RightNow\Widgets\ChatStatus' not found in /cgi-bin/***.cfg/scripts/cp/generated/staging/staging_01/optimized/views/headers/chat/chat_launch.php on line 198

    • Mirela Iepure

      Hello,

      Unfortunately not. I believe this could be a conflict in the Oracle RightNow php structure. If you get any solution please let me know.

      Best regards,
      M.

    • ilamukky

      Hello Mirela, I resolved now by deleting the custom widget (in my case, ChatStatus) and recreating it ... after the deploy, it was ok

    • Mirela Iepure

      Hello,

      When you create the first time this custom widget did have another custom Chat Widget already created in the system and working? Because that was my case and I don't think this was ok. Thanks for your response.

      Best,
      M.

    • ilamukky

      The first time I created ChatStatus was to create the CP3 version of the widget. If I remember, I later deleted it and created a second time because of an error, but I did so also with other widgets. 

      This was my first deploy and encountered the error said above...

      I went in the admin page (https://xxxxxx--tst.custhelp.com/ci/admin/versions/manage#widget=custom%2Fchat%2FChatStatus) and deactivated and deleted the widget, then I recreated it new, and it (fortunately!!!!!!!) worked in next deploy

    • Mirela Iepure

      But before the ChatStatus widget was created first was there already any other Custom Chat widget in the system?

    • ilamukky

      Yes... we have a custom chat widget...

      In template standard.php, defined the chat button:

      <div id="chat-icon"  ><a href="/app/chat/chat_launch"  title="#rn:msg:CHAT_LBL#"><img src="http://xxxxx.png" /><span>#rn:msg:CHAT_LBL#</span></a></div>

      in chat_launch page, the custom widget:

      <rn:widget path="chat/ChatPage"/>

      and in ChatPage widget there are: a form with chat input fields (name, country...) and the ChatLaunchButton, other widgets (between them, the ChatStatus), some logic based on chat hours .

      I created the ChatPage before creating the ChatStatus widget

    • Mirela Iepure

      So basically there shouldn't be any conflict between custom chat widgets.

      This is interesting.

      Thanks for sharing,
      M.