sujanm
Forum Replies Created
-
Forum: Plugins
In reply to: [Participants Database] 2.4 and 2.4.1 is breaking tags in custom templatesOK. thanks for the response. Now that I understand the issue, I can decide what to do to accommodate the change.
Also, thank you for your continued work on improving the plugin.
Forum: Plugins
In reply to: [Participants Database] Stylesheet not queued on do_shortcode()Ok understood. Thanks Roland!
Forum: Plugins
In reply to: [Participants Database] Space padded Search ValuesHi Roland, I see that you issued out Version 2.3.3 which in the change log indicates that it has fixed this issue. I have tried it out and only seems to partially work. When some fields are blank padded the updated plugin trims blanks, on other fields it does not. It is not obvious to me why some and not others.
I have two fields, one named’artist’ and one named ‘title’. the updated plugin will trim out blanks on searches using the ‘title’ field but not on the ‘artist’ field. I can provide a link to demonstrate the issue if you need to see it. Both fields are “Text-line”
Forum: Plugins
In reply to: [Participants Database] Space padded Search ValuesThanks Roland! Hopefully this fix is included in a future release but in the interim I can use one of the filters you pointed me to to intercept the search. All the best!
Forum: Plugins
In reply to: [Participants Database] PHP Fatal Error on update checkThanks for sending out the update Roland!
Forum: Plugins
In reply to: [Participants Database] PHP Fatal Error on update checkI should mention that I’m on WordPress 6.0.2 and PHP 8.0
Forum: Plugins
In reply to: [Participants Database] PHP Fatal Error on update checkUpdate, I dactivated the plugin and reinstalled the latest version and am still getting the critical error. Here is the log:
2022-10-08 07:28:00.518134 [NOTICE] [1067651] [(ip removed):58832:HTTP2-15#APVH_(website removed):443] [STDERR] participants-database plugin deactivated 2022-10-08 07:28:58.455380 [NOTICE] [1075602] [(ip removed):58860:HTTP2-3#APVH_(website removed):443] [STDERR] participants-database plugin activated 2022-10-08 07:29:25.008586 [NOTICE] [1081028] [(ip removed):58868:HTTP2-1#APVH_(website removed):443] [STDERR] PHP Fatal error: Uncaught ArgumentCountError: 3 arguments are required, 2 given in /home/(userid removed)/domains/(domain removed)/public_html/wp-content/plugins/participants-database/classes/PDb_Aux_Plugin.php:1003 Stack trace: #0 /home/(userid removed)/domains/(domain removed)/public_html/wp-content/plugins/participants-database/classes/PDb_Aux_Plugin.php(1003): sprintf() #1 /home/(userid removed)/domains/(domain removed)/public_html/wp-includes/class-wp-hook.php(307): PDb_Aux_Plugin::{closure}() #2 /home/(userid removed)/domains/(domain removed)/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #3 /home/(userid removed)/domains/(domain removed)/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #4 /home/(userid removed)/domains/(domain removed)/public_html/wp-admin/admin-header.php(303): do_action() #5 /home/(userid removed)/domains/(domain removed)/public_html/wp-admin/admin.php(239): require_once('/home/(userid removed)/...') #6 {main} thrown in /home/(userid removed)/domains/(domain removed)/public_html/wp-content/plugins/participants-database/classes/PDb_Aux_Plugin.php on line 1003Hi Praveen, The problem is no longer visible on my website as I fixed it using the information I gathered in the stackoverflow thread. Essentially I add a event handler on the shown.bs.tab event and I force a columns.adjust().responsive.recalc() to the DataTable to have it redraw to be responsive.
I will mark this issue as resolved.
I have done further investigation of the issue. The issue is the same as the issue reported here: https://stackoverflow.com/questions/70101412/how-to-make-datatable-responsive-in-bootstrap-tabs
Now that I am aware of why the issue occurs, I can craft a workaround for it. Thanks
Hi Peter, yes that makes perfect sense. I will likely do something like you suggested. Thanks again for the help.
- This reply was modified 3 years, 8 months ago by sujanm.
Thanks Peter, but I’m missing something. How would the javascript above be run if the script tags have been disabled in the dynamic hyperlink?
You have suggested using Macros, but can you post what the macro would look like if it included the above code when rendering the dynamic hyperlink?
Hi Peter,
Sorry for not being clearer. What I’m trying to achieve is to render or not render a dynamic hyperlink based upon some kind of global state (eg. only display a link if the user is logged on). I could do that in the example above if “myCondition” is a boolean javascript variable as I can set its value through PHP. If I was simply using PHP to render a page I can conditionally render an element on the page based upon a test of a PHP variable or condition. I’m not seeing how I can do that with macros.
Eg. Can I do something like this
#macro if is_user_logged_in()
or
#macro if $myPHPVariableor alternatively
#macro if myJavascriptVariable
Is that clearer?
Hi Peter,
Thanks, yes I’m aware of Macros and I use them to compare the state of a column value to determine if a hyperlink should be displayed.
Will macros be able to handle it based upon the value of a javascript variable on the page? That is essentially what I would need. I’ve read the link on Macros and it doesn’t give information on how the conditions of the macro are parsed.
Thanks again for the help!
For anyone who has a similar issue my dynamic hyperlink now looks like this:
(Sorry I couldn’t get the code to render accurately because the code is getting mangled by the post display). But to summarize, substituting the single quote character with the backtick character allows javascript to still recognize the column value variable as a string and will allows single quotes to be embedded within thee content of the column value variable.
Thank you Peter for the quick response! Yes it fixes the problem for me with single quotes.
As a general question regarding column value substitution, can you confirm that HTML encoded text being retrieved from the database are being unescaped prior to being embedded in the HTML string being generated by the plugin? Thanks again.