Customer Portal

Get Involved. Join the Conversation.

Topic

    Walter Kamp
    RNCPHP\MessageBase for custom messagebase record works only...Answered
    Topic posted May 10, 2017 by Walter KampSilver Medal: 2,000+ Points 
    622 Views, 21 Comments
    Title:
    RNCPHP\MessageBase for custom messagebase record works only in development
    Content:

    This line works perfectly fine in development mode:
    RNCPHP\MessageBase::fetch("CUSTOM_MSG_POPUP_TITLE_64")->Value;
    The code is in the getData() function of the controller.php of a widget.


    In staging and production we get this error:
    Fatal error: Uncaught exception 'RightNow\Connect\v1_3\ConnectAPIError' with message 'Invalid ID: No MessageBase record found with LookupName = '(1000288)'' in /cgi-bin/<site>.cfg/scripts/cp/generated/staging/staging_01/optimized/views/headers/ajax.php:19

    Any ideas?

     

    Version:
    CP 3.5.2, Service Cloud Nov'16

    Best Comment

    Pramod Vasudeva Murthy

    Could it be a bug? Is it same in Custom script using name? If it does that means there is some library in Custom script and not in Controller? Try putting this in model see if it makes a difference..

    ~VIP

    Comment

    • Dietrik

      Another workaround for the feb 17 release is using an older framework version. I have no information if the patch will be ported to the nov 2016 version.

      As it's called a bug in the feb 17 release I assume it's the same for nov 16.

    • Kurt Helfrich

      We used to use our own homegrown custom message solution, but when Oracle released the custom message base entries, we started transitioning away from our solution.  We use this convenient and simple inline tag form to bring up the custom message base entries just like you do for the Oracle ones:

      #rn:msg:CUSTOM_MSG_ENTERPRISE_EMAIL_ADDRESS#
      

      Now I'm finding that some of those references, which worked in dev, are failing in production.   The error that comes up looks like:

      Invalid ID: No MessageBase record found with LookupName = '(1000444)'
      

      The template stuff loads, but the page contents don't load - we just get this message in the page area.

      Is this the same problem?  It seems likely.  Since these references get resolved at run time on the server, I would think the data is available.

      Bah.  I can't even check the ID.  The msgbase_entries table is not exposed in Analytics.

      Let's call this what it is.  It's a BUG.  It works in one environment but not in the other.  In any event, it's really frustrating, and it's going to cost me a fair amount time to convert to something that works (around the problem), if there's no other way to get it working.  Strange

      I'm pretty sure we have some of these references working fine on pages other than the new ones I just pushed out.  I'm going to look after I calm down.  Maybe it's a staging bug.

    • Kurt Helfrich

      We used to use our own homegrown custom message solution, but when Oracle released the custom message base entries, we started transitioning away from our solution.  We use this convenient and simple inline tag form to bring up the custom message base entries just like you do for the Oracle ones:

      #rn:msg:CUSTOM_MSG_ENTERPRISE_EMAIL_ADDRESS#
      

      Now I'm finding that some of those references, which worked in dev, are failing in production.   The error that comes up looks like:

      Invalid ID: No MessageBase record found with LookupName = '(1000444)'
      

      The template stuff loads, but the page contents don't load - we just get this message in the page area.

      Is this the same problem?  It seems likely.  Since these references get resolved at run time on the server, I would think the data is available.

      Bah.  I can't even check the ID.  The msgbase_entries table is not exposed in Analytics.

      Let's call this what it is.  It's a BUG.  It works in one environment but not in the other.  In any event, it's really frustrating, and it's going to cost me a fair amount time to convert to something that works (around the problem), if there's no other way to get it working.  Strange

      I'm pretty sure we have some of these references working fine on pages other than the new ones I just pushed out.  I'm going to look after I calm down.  Maybe it's a staging bug.

    • Kurt Helfrich

      I've tried to post this before - sorry if it's a duplicate, but I don't see it.

      We used to use our own homegrown custom message solution, but when Oracle released the custom message base entries, we started transitioning away from our solution.  We use this convenient and simple inline tag form to bring up the custom message base entries in a CP page just like you do for the Oracle ones:

      <h1>#rn:msg:CUSTOM_MSG_ENTERPRISE_VIEWS_PER_PERSON#</h1>
      

      Now I'm finding that some of those references, which worked in dev, are failing in production.   The error that comes up looks like:

      ​Invalid ID: No MessageBase record found with LookupName = '(1000444)'
      

      The template stuff loads, but the page contents don't load - we just get this message in the page area.

      Is this the same problem?  It seems likely.  Since these references get resolved at run time on the server, I would think the data is available.

      Bah.  I can't even check the ID.  The msgbase_entries table is not exposed in Analytics.

      Let's call this what it is.  It's a BUG.  It works in one environment but not in the other.   

      I did find a lot of references like this that are working fine on other CP pages at the same time that these new ones don't.  Could there be a compilation bug?

      <a class="noIntercept" alt="#rn:msg:CUSTOM_MSG_NETWORK_MEDIA#" title="#rn:msg:CUSTOM_MSG_NETWORK_MEDIA#" href="/app/ask/p/4476,4479<?=$showmenu;?>">#rn:msg:CUSTOM_MSG_NETWORK_MEDIA#</a>
      

      In any event, it's really frustrating, and it's going to cost me a fair amount time to convert to something that works (around the problem), if there's no other way to get it working.  The other suggestions do not appear to be working in staging in the context that I'm using them, on a CP web page.

    • Suresh Thirukoti

      I think your concern has a solution in the below post



      https://cloudcustomerconnect.oracle.com/posts/97071e5fbd



      ~Suresh

    • Vijayalakshmi Arunachalam

      In the custom model I am trying to throw   echo $incidentInfo = $CI->model('custom/SendMail') ->SaveDetails() from ccntroller. It works fine in Development not in production. any idea? Want to display output message from controller to php file.