Customer Portal

Get Involved. Join the Conversation.


  • Steve Long

    Hi Monique,


    I've sent the file and URL that we are using. If you need further information or if the file doesn't come through, let me know. We are on August '08.




  • monique perkins

    1 - can you email me your ajaxCustom file along with the url and parms you are using to hit it?


    2 - You are on Aug 08 - correct?

  • Steve Long
    Yes, the parm_segment is set.
  • monique perkins

    So do you have the parm_segment


    function ajaxCustom()
    $this->config->set_item('parm_segment', 3); }

    added to the constructor? 

    The parm segments are off on aug 08 (which was corrected in nov 08) and only seems to be a problem with the search filter call. 


  • monique perkins

    1 - userid is the login name so it can be alphanumeric plus many special character.

    2 - When I encode those exact parameters I get your same encoding so that is not the problem.

    3 - Your email has%40 instead of @ which wont be valid.

    4 - make sure your p_li_password matches the config MYSEC_LI_PASSWD

    5 - if you have MYSEC_LI_ERR_ENABLED then verify you are sending in a valid user/ combination for you system (I doubt that email will pass)




  • Steve Long

    That's a very similar problem, and in fact was the person who orginally wrote this code. It seems to work fine for all other parameters until I try to pass 'p'. Even the print_r($filters) does not return the proper data as seen below:



    [per_page] => 2
    [kw] => camshaft
    [page] => 3
    [p] => 1,2,5
    [search] => 1
    [searchType] => stdClass Object
    [filters] => stdClass Object
    [rnSearchType] => searchType
    [fltr_id] => 3
    [data] => 3
    [oper_id] => 1
    [report_id] => 102139

    [type] => searchType
    [keyword] => stdClass Object
    [filters] => stdClass Object
    [rnSearchType] => keyword
    [data] => camshaft
    [report_id] => 102139
    [type] => keyword


    If I was to add some custom handling in my filter setting loop to properly format this filter, would that solve my problem? If so, what information would be necessary? If not, is there another function I can call or parameter I can add to force this to be parsed?


    Also, I'm not sure if it's related, but when I try to put the '->CI ' in my function calls, I receive a PHP error: Call to a member function <functionname> on a non-object.


  • Outspark



    I am urlencoding the values of each key/value pair, following a base64_encode on the query param string once all k/v pairs have been placed in the query param string... if that helps you shed some light on my problems :D




    $query_params = base64_encode('p_userid=12341234&p_passwd=187y1c781gv87&');




    A quick question... Does RightNow's authentication library only accept numeric values as userid?

  • monique perkins

    PTA redirects to the value set in MYSEC_EXT_LOGIN_URL on a failed attempt.


    You might want to switch that to something besides your script so you don't get into an infinite loop on a failed login.  If you are getting redirected then something in your encoded string is not correct. 


    I'll verify you are using the correct encoding....

  • Outspark

    I've tried to access, which is redirecting the user back to my script, which redirects the user back to RN (since the user is logged into our site, my script redirects the user back to RN with user credentials encoded in the query param)


    I think this should give more visibility in what the request looks like:


    unenc query param (fake data):




    encoded url:


  • monique perkins

    You appear to have the correct url now


    Can you get to your site with the regular url


  • Outspark

    Just an update....


    i've change the url to: 'http://<company>' + the encoded query param string.


    I have tried testing to see if RN PTA would create and auto-login the user session, but it redirects back to our site (in this case, I have set the external login url to the script that redirects the browser to RN, so the session goes into an infinite loop). So naturally, RN's PTA sees the user data as non-existent and denies the authentication attempt, instead of creating a new contact record.


    Help is appreciated!

  • monique perkins

    Look at this post and see if its the same problem


  • Steve Long

    I've modified my code to use getDataHTML but am still experiencing the issue. I also added a little test code to make sure the filter set actually contained all the expected filters. When I run my test code on the page, I still get the same warning as well as a new warning.


    My test code:

    $results = $this->Report_model->getDataHTML($reportid, $r_tok, $filters, $format);

    //test code

    foreach($filters as $key => $value) {
    echo('<' . $key . '>' .$value. '</'.$key.'>'); <-error line

    foreach($results as $key => $value) {
    echo('<' . $key . '>' .$value. '</'.$key.'>');


    I am now receiving a PHP error with severity 4096, message: Object of class stdClass could not be converted to string on the line which echoes the key/value pair for the filters set. When I view the source of the result page in Firefox, the error is thrown after the search filter but before the searchtype filter. It is thrown again after the searchtype filter but before the keyword filter. Everything else seems to output correctly.


    Does the searchtype need to be explicitly set in this case? If so, what is the proper value to set it to and where? I've attached a screenshot of the view source which contains the error messages in case that might be helpful.


    Thanks, Steve


  • monique perkins

    1 - the setFitersFromURL should take care of everything

    2 - I'm not sure getDataXML works - try getDataHTML and see if that is better.

  • Steve Long

    Using that code I posted, I still get the warning when trying to pass in the product parameter. Does the getDataHTML method treat filters differently or just return a different format of result?


    From a format standpoint - the XML formatting code that is present in our custom controller seems to work well for now, so I don't necessarily want to mess with it.


    If I was to add something like below (format is probably incorrect), would it help? Or is this already being taken care of in the setFiltersFromUrl?



    elseif($key == 'p') { $filters[$key] = $value; $filters[$key]['name'] = 'MenuFilterDropdown'; $filters[$key]['rnSearchType'] = 'menufilter'; $filters[$key]['type'] = 'p'; $filters[$key]['filter_name'] = 'map_prod_hierarchy'; $filters[$key]['element_name'] = 'MenuFilterDropdown_3'; }


     Thanks, Steve