Understanding RelatedRecordsLookup Plugin in context with newer CMSB versions

5 posts by 2 authors in: Forums > CMS Builder
Last Post: November 29, 2012   (RSS)

By Codee - November 26, 2012

I have a website (several, but one REALLY important) that started with earlier versions of CMSB (1.4ish) and at the point when Chris created his initial relatedRecordsLookup plugin it was used to pull information from one CMS table into another on the public php pages. The membership function is also instituted. So, for this client: the end users login to get specific lessons related to their login only, and within each lesson data is pulled in for homework drills. Later, I had the PDF creator plugin installed. Everything was working well.

Then we added another section for things to remember (like the drills) but I don't think the things to remember was added to the coding for the relatedrecordslookup, but didn't notice a problem inside the lessons (but didn't test the PDF creator).

We went through multiple version upgrades.

Somewhere along the road the PDF creator stopped working properly. Right now if someone clicks on "create PDF" from within their lesson they get an error page that reads: "Notice: Undefined index: remember_8 in
/home/letitfly/public_html/lifgAdmin/plugins/relatedRecordLookupFunctions.php on line 47
lookupRelatedFields: field 'remember_8' not found"

but there is no "remember_8" field, but there is remember_1 through remember_7.

What I'm wondering is how to fix the PDF creator but also want to know is has the relatedRecordLookup plugin become deprecated in lieu of having that type of coding built into the core CMSB - so should the php pages that utilize it be recoded?

Re: [equinox69] Understanding RelatedRecordsLookup Plugin in context with newer CMSB versions

By Jason - November 28, 2012

Hi,

From what you describe, it doesn't sound like the createdPDF plugin is broken. What seems to be happening is the error inside relatedRecordLookupFunctions.php is stopping the script from running, which is why the PDF doesn't be generated.

I took a look at the code of this plugin and line 47 looks for a field name side the schema (ie, remember_8). this list fields comes from the "fieldList" option that is passed into the function. I would start by taking a look at your function call to ensure that "remember_8" is not being passed into the function.

Hope this helps get you started. Please let me know if you run into any issues.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [equinox69] Understanding RelatedRecordsLookup Plugin in context with newer CMSB versions

By Jason - November 29, 2012

Hi,

Another thing you can try is to do a search through all of your .php files for all references to the realtedRecordsLookup function. This will help you isolate exactly which function call is causing the error. That will most likely be where "remember_8" is being passed in. The function is working from a passed in array of field names, so this must be created somewhere in your code.

Hope this helps. Please let me know if you have any other questions.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Understanding RelatedRecordsLookup Plugin in context with newer CMSB versions

By Codee - November 29, 2012

doh! GREAT idea, Jason! Wasn't thinking it through completely. Thank you.