pcgardner
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress Importer] Importer basic instructions for useI don’t think this is the plugin you need. More appropriate would be All-in-One WP Migration or Duplicator.
Forum: Plugins
In reply to: [A-Z Listing] Cross-references?Thank you – that’s ingenious! I’m afraid I don’t quite see how it would work, though. Presumably my custom taxonomy, subjects, would have to have a custom field called aliases which if the term is a X-ref would contain a list of comma-separated alias subjects. That’s okay, I think.
The problem is that each of those aliases would have to actually function in the same way as it does in its proper place in the list – it would have to link to all the posts that had the alias subject. Wouldn’t you have to use another loop, to find those posts? That could be very resource-hungry.
To use my previous example, an entry might look like this:
Thrush see Turdus turdus; garden birds.If only it were possible to include two taxonomies in one listing! Then I could combine the subject taxonomy with an alias taxonomy. The alias taxonomy wouldn’t have any posts, it would simply have the entire cross-reference as its title (unlinked – the user would have to find the item referred to manually, as with a book index).
- This reply was modified 5 years, 9 months ago by pcgardner.
Forum: Plugins
In reply to: [A-Z Listing] Ignore articles (A, An, The)In the documentation this filter hook is marked as deprecated. Is this simply because its name is to be changed, or will it disappear altogether?
Thank you! That’s unbelievably straightforward. As I already had a custom template I just added two lines at the start:
<?php /* * The email address has been verified, so * mark the participant as 'approved' */ $participant_id = $this->participant_values['id']; Participants_Db::write_participant( array('approved' => 'yes'), $participant_id ); /* * First, check for the value that determines what kind of * record edit form to show */ $type = $this->participant_values['source_page']; /* * Now, show the record edit form for that type */ switch ( $type ) { case 'sign-our-letter-laity': echo do_shortcode('[pdb_record groups="main,church_of_england,laity"]'); break; case 'sign-our-letter-clergy': echo do_shortcode('[pdb_record groups="main,church_of_england,clergy"]'); break; case 'sign-our-letter-anglican-communion': echo do_shortcode('[pdb_record groups="main,anglican_communion"]'); break; }
And it just works!
I couldn’t find a way to donate so I’ve bought a site licence for the Email Expansion add-on, which I shall find useful. Thank you again.
Oh! Yes, with that change it now works fine – thank you. Frustrating that I’ve spent hours struggling with it.
I see the tutorial page has been corrected now. It didn’t occur to me that the original code might be wrong, as the comments suggested that at least some people had been able to use it successfully. Presumably the plugin coding has been updated since then.
May I ask your help about something connected? I would like the Private Link, when clicked, to automatically change the corresponding record so that the Approved field is set to ‘yes’. This would make the Private Link verify the email address without the user or the admin needing to do anything else.
Can this be done by adding some code to the beginning of pbd-record-usertype.php that would change the database record without the user submitting the form? If so, can you tell me how to do this?
Thanks again for all your help and for such a wonderful plugin. I shall make a donation.
Phil
No, it is correct in all the records – I’ve tried several.
Thanks very much for your helpful response.
This is a development site, so WP_DEBUG is on, but it is not outputting to the screen. The debug output goes to the debug.log file in wp-content.
I am using the access code. In the admin ‘List Participants’ page I click on the access code for one of the records, which takes me directly to the Edit Record page for that record, with a URL like this: https://dev.cofe-equal-marriage.org.uk/support-the-campaign/sign-our-letter/open-letter-edit-your-record/?pid=W7K4K
The relevant part of the HTML output of that pages looks like this:
<div class="entry-content"> <p>If you have lost your private link to access your record, please <a href="https://dev.cofe-equal-marriage.org.uk/support-the-campaign/sign-our-letter/private-link-reminder-request/">click here</a> to request a reminder; your link will be emailed to you.</p> <!-- template: equal/templates/pdb-record-usertype.php -->Source page: <!-- end template: equal/templates/pdb-record-usertype.php --> </div>
That looks complete to me, not as if an error has truncated the output. And the rest of the page (the footer) is displayed correctly.
It seems that $type is empty when it ought to contain (in the above example) the value
sign-our-letter-laity
, the slug of the source page, which displays correctly in List Participants. Because $type is empty, theecho do_shortcode
commands are never called. So the output is as expected.The crucial question must be, why is $type empty?
By emptying debug.log as you suggested, I have discovered that the error
[19-Apr-2019 20:59:31 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /var/www/clients/client54/web203/dev/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php on line 46
occurs when I load the List Participants page. No further errors are added to debug.log when I access the Edit record page.Forum: Plugins
In reply to: [Participants Database] Linked tables?That’s good to know! It would be so much easier to do what I want using linked tables that I think it’s worth my waiting until the feature is available. Is there any chance you could let me know when it’s ready?