WPIntell

Source evidence

Migrating database to new website

Participants Database · support · 2026-04-20T20:47:00+00:00

complaintsentiment
mediumseverity
0.93relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 31 rows with source links

16.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
stevray unresolved
I am trying to move the Participants Database to a new website. I configured the plugin on the new site in exactly the same way as on the old site and then used a csv file to transfer the data. That worked ok but when I tried to display the data on a responsive table, most of the fields (but not all) show up as NULL. In the template, statements, statements like: $first_name = $this->the_record->fields[“first_name”]->value; return the correct value. However, other statements like: $phone=$this->the_record->fields[“phone”]->value; return NULL. This is true for a bunch of such fields but phpMyAdmin shows real, non-NULL data in those fields as well as in the few fields that return non-NULL values. I would greatly appreciate any enlightenment on why this is happening and how to fix it. Hi, I’m missing some context on the code you’re showing there, but it looks like it may be incorrect. The $this->the_record term you are using is not one the plugin normally uses in templates. Check to make sure you’re correctly accessing objects in the template. I can’t be more specific, since I don’t know the context of the code you have there. It sounds like the migration was successful, looking directly at the database is the best way to see if the data is really there. Are you seeing any other indications that there was a problem with the migration? First, a clarification. I mistyped the code I am using. I am not using: $phone=$this->the_record->fields[“phone”]->value; as mentioned in the original post; rather I am using $phone=$this->record->fields[“phone”]->value; After much flailing about (and having to drop this problem for a while because of other commitments), I used var-dump to examine $this->record->fields. While the database has 13 fields under Contact_Info, the var_dump showed that only 6 were being returned. So, finally, I looked at the debug log and found out why. The SQL query that PDB was issuing to the database is: PDb_List::_setup_iteration list query: SELECT p.id, p.first_name, p.last_name, p.phone, p.extension, p.email, p.cell_phone FROM wp_0p8vw5grsj_participants_database p WHERE p.status = “departed” ORDER BY p.last_name ASC, p.first_name ASC So, how do I get PDB to issue a query for all the fields in the database? I realize that this whole mess looks like a rank amateur flailing about beyond his depth. In my defense I would point out that, while I wrote my first computer program in 1965 and, at last count, have written code in 28 different dialects of 15 different languages, I have not programmed professionally for 15 years. The website that I am working on is for the residents of the continuing care retirement community that I live at. So, I would appreciate any help anyone can give. The query you’re looking at is for getting the records to be shown in a list display generated by the [pdb_list] shortcode. For efficiency, it only includes the fields that are needed for that display. If you are creating a custom template for the list display, and you want to be able to access any value in the current record (as the list is displayed, it iterates through the records) you need to use a utility class (named PDb_Template) that provides access to the data in a more general way. The how-tos of all this is explained in this article: The Template Helper Class We do it this way to avoid loading a lot of data that isn’t needed. Let me know if you have more questions about this. Also, take a look at this article for more detail: Using the PDb_Template Helper Class in a Custom List Template

Comments

4 shown
rolandbarker 2026-04-21T18:05:00+00:00

Hi, I’m missing some context on the code you’re showing there, but it looks like it may be incorrect. The $this->the_record term you are using is not one the plugin normally uses in templates. Check to make sure you’re correctly accessing objects in the template. I can’t be more specific, since I don’t know the context of the code you have there. It sounds like the migration was successful, looking directly at the database is the best way to see if the data is really there. Are you seeing any other indications that there was a problem with the migration?

stevray 2026-05-01T16:22:00+00:00

First, a clarification. I mistyped the code I am using. I am not using: $phone=$this->the_record->fields[“phone”]->value; as mentioned in the original post; rather I am using $phone=$this->record->fields[“phone”]->value; After much flailing about (and having to drop this problem for a while because of other commitments), I used var-dump to examine $this->record->fields. While the database has 13 fields under Contact_Info, the var_dump showed that only 6 were being returned. So, finally, I looked at the debug log and found out why. The SQL query that PDB was issuing to the database is: PDb_List::_setup_iteration list query: SELECT p.id, p.first_name, p.last_name, p.phone, p.extension, p.email, p.cell_phone FROM wp_0p8vw5grsj_participants_database p WHERE p.status = “departed” ORDER BY p.last_name ASC, p.first_name ASC So, how do I get PDB to issue a query for all the fields in the database? I realize that this whole mess looks like a rank amateur flailing about beyond his depth. In my defense I would point out that, while I wrote my first computer program in 1965 and, at last count, have written code in 28 different dialects of 15 different languages, I have not programmed professionally for 15 years. The website that I am working on is for the residents of the continuing care retirement community that I live at. So, I would appreciate any help anyone can give.

rolandbarker 2026-05-02T02:45:00+00:00

The query you’re looking at is for getting the records to be shown in a list display generated by the [pdb_list] shortcode. For efficiency, it only includes the fields that are needed for that display. If you are creating a custom template for the list display, and you want to be able to access any value in the current record (as the list is displayed, it iterates through the records) you need to use a utility class (named PDb_Template) that provides access to the data in a more general way. The how-tos of all this is explained in this article: The Template Helper Class We do it this way to avoid loading a lot of data that isn’t needed. Let me know if you have more questions about this.

rolandbarker 2026-05-02T02:48:00+00:00

Also, take a look at this article for more detail: Using the PDb_Template Helper Class in a Custom List Template