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: [Jason] Understanding RelatedRecordsLookup Plugin in context with newer CMSB versions

By Codee - November 28, 2012

Hi Jason,
Before posting to the forum:

1. I reviewed the plugin .php page and saw the code you referenced for line 47...so, then I...

2. Opened my .php list page and details page to find any reference at all for "remember_8" and not able to locate it. I realized it must be pulling the reference from SOMEWHERE so I...

3. Opened up the section editor to see if that field (remember_8) is a field anywhere in the section and I don't see it. So, I was stumped and posted to the forum.

Is there somewhere else I should check? Maybe open up the live database in phpMyAdmin? (I am terrified to monkey with the live database like that because I'm inexperienced at it).

Thanks in advance.

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.