Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Undefined index: createdByUserNum......

 

 


philb
Novice

Jun 18, 2008, 5:56 AM

Post #1 of 6 (296 views)
Shortcut
Undefined index: createdByUserNum...... Can't Post

Hi,

I have created a simple page showing the items of a list.
At the top of the page (showing the list) I get this error for every entry -if there is 15 items it will show 15 times in a row-:

Code
Notice: Undefined index: createdByUserNum in /home/xxxx/public_html/cmsAdmin/lib/viewer_functions.php on line 198



Thanks

Philippe


Dave
Staff / Moderator


Jun 18, 2008, 2:13 PM

Post #2 of 6 (274 views)
Shortcut
Re: [philb] Undefined index: createdByUserNum...... [In reply to] Can't Post

Hi Philippe,

Are you using the 'joinTable' option or working with the sample realty templates? If so, try removing the 'joinTable' option.

If that's not it, can you attach your viewer to the post so I can have a look? Thanks!

Dave Edis - Senior Developer
interactivetools.com


philb
Novice

Jun 18, 2008, 5:08 PM

Post #3 of 6 (270 views)
Shortcut
Re: [Dave] Undefined index: createdByUserNum...... [In reply to] Can't Post

Hi Dave,

I'm not using template and I don't know about the joinTable option.

This is what I did.

1- In section Editor I created a new multi-record Editor;
2- Added the fields I needed;
3- Set the other tabs, Viewers URL, Searching, Sorting & Advanced;
4- Got the code selecting List Page.
5- Created a simple test page with the code and modifying it to display the way it will be (simple test no css);
6- Uploaded the file (http://www.pb3d.com/test/ventes_de_lotsList.php).

I just bought your cms yesterday and I'm doing some test to see if it will be OK for my project.
So far it's a wonderful piece of software and I wish I add found it earlier.

Thanks for your time

Philippe


(This post was edited by philb on Jun 18, 2008, 5:09 PM)
Attachments: ventes_de_lotsList.php (1.94 KB)


Dave
Staff / Moderator


Jun 18, 2008, 6:01 PM

Post #4 of 6 (257 views)
Shortcut
Re: [philb] Undefined index: createdByUserNum...... [In reply to] Can't Post

Great description, that made it really easy for me to reproduce. Thanks. :)

It's a bug. It happens when you don't have a 'createdByUserNum' field. By default the viewers will load in extra fields about the record creator such as createdBy.fullname, createdBy.email, etc.

I've added a fix for this to the next version. Here's how you can apply it now.

- Open /lib/viewer_functions.php
- Make a backup copy of that file.
- Search for "Add createdBy.fields to records" (around line 65)
- add the code in red to the line below it (or just replace the line)

if (@$options['loadCreatedBy'] && @$schema['createdByUserNum']) { _getRecords_joinTable($rows, $options, 'accounts'); }


Another approach is to just add this line (in red) to your viewer code:

list($ventes_de_lotsRecords, $ventes_de_lotsMetaData) = getRecords(array(
'tableName' => 'ventes_de_lots',
'loadCreatedBy' => false,
));


Let me know if either of those fixes it, and thanks for reporting this!

Hope that helps, let me know if you need anything else.

Dave Edis - Senior Developer
interactivetools.com


philb
Novice

Jun 18, 2008, 6:30 PM

Post #5 of 6 (256 views)
Shortcut
Re: [Dave] Undefined index: createdByUserNum...... [In reply to] Can't Post

WOW Dave!

This is what I call excellent serviceWink

I tried both fix and they both work.

I'm going to use the first one (the modification in the viewer_functions.php file).

With the update to fix this will I have to undo the change to the viewer_functions.php file or will the update contain a new viewer_functions.php?

Thanks for such good and fat response.

Philippe


Dave
Staff / Moderator


Jun 18, 2008, 7:02 PM

Post #6 of 6 (251 views)
Shortcut
Re: [philb] Undefined index: createdByUserNum...... [In reply to] Can't Post

Glad to help! :)

The next version will have an updated viewer_functions.php so you won't need to worry about it. You can just overwrite the file.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4