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: [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: [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.