• Resolved joymorin

    (@joymorin)


    Help! A string combine field is suddenly not working. Instead of properly displaying each participant’s last name followed by a comma and first name, the table is showing literally “[last_name], [first_name]”.

    Some of the older entries are displaying names properly. It seems to be the newer entries that aren’t working properly. (See link I provided.)

    I’m guessing this is some kind of bug relating to the recent plugin updates, but if there’s something on my end I can do please let me know.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Roland Barker

    (@xnau)

    I’m sorry about this problem you’re seeing, not sure what caused it, but there is something you can do that should fix it.

    Go to the Manage Database Fields and make a change to the “template” of your string combine field. That will regenerate all the strings. If you want, you can change it back to what you had before (and they will be regenerated again). It won’t regenerate unless it detects a change to the template.

    Thread Starter joymorin

    (@joymorin)

    Thank you so much for the suggestion. I followed your instructions, and unfortunately the problem is persisting. No matter what I place in the “Template” field, that exact text is displayed in the table instead of the proper data filled out by the participant.

    To troubleshoot further, I decided to create a new field nearly identical to the “Full Name” string combine field I had set up previously. The only thing I did different was to name it “full” instead of “full_name”. Interestingly, this column remains blank, no matter what I type in the “template” field — whereas the original column always displays whatever I’ve typed into the “template” field (with the exception of the participants who entered their information a week or more ago. Those names do display properly).

    I hope that makes sense. In short, it still seems to me that there is some kind of bug going on with the string combine function, since I can’t seem to get a newly created string combine field to work properly either. Of course, it’s always possible it’s something specific to our website or just something super obvious I’m missing!

    Thanks so much for your help.

    • This reply was modified 4 years, 4 months ago by joymorin.
    Plugin Author Roland Barker

    (@xnau)

    I’ve tested this just now and what you’re seeing is so far from what should be happening that I’m wondering if the plugin might need to be reinstalled.

    But before you try that, I’d like you to turn plugin debugging on, clear the log, then try my original suggestion of changing and saving the String Combine field template.

    You should see in the log the strings getting saved, or perhaps there will be some kind of error.

    Thread Starter joymorin

    (@joymorin)

    Thanks! I turned on the debug log, change me the String Combine template field to “[city]”, and here’s what the log shows:

    Log file initiated at: February 7, 2022 12:24 am UTC
    [02/07/22 12:25am UTC]
    PDb_Manage_Fields_Updates::update_fields update fields: UPDATE <code>wp_participants_database_fields</code> SET <code>title</code> = 'Full name', <code>group</code> = 'admin', <code>form_element</code> = 'string-combine', <code>help_text</code> = '', <code>options</code> = 'a:0:{}', <code>validation_message</code> = '', <code>default</code> = '[city]', <code>attributes</code> = 'a:0:{}', <code>signup</code> = '0', <code>csv</code> = '0', <code>readonly</code> = '', <code>sortable</code> = '0', <code>persistent</code> = '' WHERE <code>id</code> = '26' /* From [www.a2pianoteachers.com/wp-admin/admin-post.php] in [/nas/content/live/a2pianoprod/wp-content/plugins/participants-database/classes/PDb_Manage_Fields_Updates.php:191] */
    [02/07/22 12:26am UTC]
    PDb_List::_setup_iteration list query: SELECT p.id, p.full_name, p.full, p.city, p.zip, p.openings, p.travel_to_homes, p.online_lessons, p.demographics_taught, p.musical_styles FROM wp_participants_database p ORDER BY p.last_name ASC
    [02/07/22 12:26am UTC]
    PDb_List::_setup_iteration list query: SELECT p.id, p.full_name, p.full, p.city, p.zip, p.openings, p.travel_to_homes, p.online_lessons, p.demographics_taught, p.musical_styles FROM wp_participants_database p ORDER BY p.last_name ASC
    [02/07/22 12:27am UTC]
    PDb_List::_setup_iteration list query: SELECT p.id, p.full_name, p.full, p.city, p.zip, p.openings, p.travel_to_homes, p.online_lessons, p.demographics_taught, p.musical_styles FROM wp_participants_database p ORDER BY p.last_name ASC

    Meanwhile on our website, you can see how the “Full Name” column shows literally “[city]” for a number of participants’ names.

    Plugin Author Roland Barker

    (@xnau)

    Ok, you should reinstall the plugin.

    Here’s how to do that without losing any settings:

    Download the plugin and install it (this is on the Plugins page at the top…”Add New” then “Upload Plugin”) and when it asks if you want to update the existing plugin, answer yes and go ahead.

    You will need to rebuild the string combine field values because they will still be incorrect in the database.

    Thread Starter joymorin

    (@joymorin)

    I went ahead and reinstalled the plugin following your instructions. Strangely, the problem is persisting exactly as before. The original “Full Name” String Combine column shows whatever exact text I have entered into the template field (with the exception of the older entries, which show the names correctly). I created a brand new String Combine field called “test,” and this one displays blank no matter what I type into the template field.

    If I can’t get the String Combine feature to work, I might have to just revert to using two separate columns displaying first names and then last names.

    If you have any other suggestions, please let me know! Thanks so much for the support you’ve provided.

    Thread Starter joymorin

    (@joymorin)

    In case this is useful information…

    I discovered the reason why the “Full Name” column was displaying the text from the Template field while the other String Combine columns were just displaying blank space. The reason they were acting differently is because the “Full Name” column was the one set as the Single Record Link Field in Settings — i.e., the field on which to put a link to the [pdb_single] shortcode. When I changed the Single Record Link Field from “Full Name” to another column, the “Full Name” column now displays blank as do the other String Combine columns.

    Thread Starter joymorin

    (@joymorin)

    I discovered something else strange that may or may not be related.

    I just realized that when new participants sign up, I am not receiving an email notification saying so. I thought this function was working properly during our building/testing phase while our website was still on our web designer’s servers, but perhaps not. I just did a test and found that when I am logged into WordPress and submit a new signup, I DO receive an email notification as admin and I also received the “You’ve been added to the Find-a-Teacher page” email.

    But when I submitted a new signup when I was NOT logged into WordPress, I did NOT receive an email notification for that signup. Nor did I receive an email saying, “You’ve been added to the Find-a-Teacher page.”

    In both cases, the test participant info DOES successfully submit and appear in the table on the website.

    • This reply was modified 4 years, 4 months ago by joymorin.
    • This reply was modified 4 years, 4 months ago by joymorin.
    Plugin Author Roland Barker

    (@xnau)

    Thanks for figuring out the detail of the template appearing in the string combine field. Yes, it will do this of there is no generated string to place the link on. A field that is used as the single record link field should be one that has a proper value for all records.

    You comment about the email suggests that there is a page cache active on the signup and signup thanks page (if you’re using one). Frequently, if there is a page cache active on a page with dynamic content, the dynamic part of the page display is not executed because the cache is displaying the cached page instead of generating it.

    I suggest you exempt your signup and signup thanks pages from caching.

    Thread Starter joymorin

    (@joymorin)

    I reached out to our web designers and got them to add caching page exceptions for the necessary URLs. This has indeed solved the issues with the email notifications sending. Thanks!

    Still no luck getting the String Combine fields to work properly. If we’re run out of ideas for troubleshooting this for now, I will just go ahead and opt for two separate columns to display the first names and last names.

    Thanks so much for your time and prompts replies, and of course for the great plugin!

    Plugin Author Roland Barker

    (@xnau)

    What is the “template” setting for your string combine field?

    Hi,

    we have encountered this problem.
    A further point is that –
    if a new entry is created using the wp-admin Add Particpant interface the string-combines work (although perhaps not perfectly)
    Whereas if a new entry is created via a sign-up form, the string-combines don’t work.

    This string-combine facility is central to our current use of the plugin.
    It would be helpful to get a reading of the prospects of this being fixed – if the problem is likely to persist for some time, I would have to completely re-do the system (I am a very amateur developer).

    Some background –

    We are a v. small community membership organisation with slightly complex requirements, such as different catgeories of members based on criteria such as their location and whether thay are on the electoral roll.
    The volunteer person who runs the system is not comfortable with the wp-admin interface; so we have front-end admin. forms using pdb_list and pdb_record on private webpages which include instructions on the use of the forms.
    E.g. The listing of pending membership applications has a field which is a link to the webpage for the acceptance form –

    accept_as_full_member ::= Accept Ordinary

    That form will have read-only versions of user’s input,e.g.

    their_postcode ::= [zip]

    The current version has some 20 inter-linked admin.-forms, and 4 slightly different signup forms.

    (By the way, overall I think this plugin is brilliant – thank you)

    PS
    woops – something was rendered as a link –
    accept_as_full_member ::=constructed as a URL with [private_id]

    Plugin Author Roland Barker

    (@xnau)

    Make sure the string combine field is assigned to the signup form.

    Oh, and by the way, you should start a new thread if you have a new question, your case is different than the original post. It’s more helpful to other users that way.

    • This reply was modified 4 years, 3 months ago by Roland Barker.

    Hi
    Thank you for the suggestion. I tried that, but makes no difference so far as I can see.
    I understand about having a new topic for a different question. But I don’t quite see how my question is different from “Bug? String combine field suddenly not working” although my use-case is more complex. Should I start this as a new topic “String combine not working” or somehing?

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Bug? String combine field suddenly not working’ is closed to new replies.