So I verified that deactivating the Force Login plugin gets rid of the errors. And the List, Month, and Day buttons then behave as they should. However, the Find Events button still doesn’t seem to work. If I enter words from event titles or descriptions in the search box, the result is always “There were no results found for?“whatever-I-entered”. Is the feature supposed to search both titles and text from events? If not, then what does it search? Is it case-sensitive?
]]>[29-Jun-2023 14:05:56 UTC] PHP Fatal error: Uncaught Error: Call to a member function find() on bool in /home/saunapla/web/live/public_html/wp-content/plugins/accessibility-plus/accessibility.php:110
Stack trace:
0 /home/saunapla/web/live/public_html/wp-content/plugins/accessibility-plus/accessibility.php(274): easywpstuff_assesplus_add_aria_labels_to_buttons('')
1 [internal function]: easywpstuff_assesplus_bstr_template_redirect('', 9)
2 /home/saunapla/web/live/public_html/wp-includes/functions.php(5309): ob_end_flush()
3 /home/saunapla/web/live/public_html/wp-includes/class-wp-hook.php(308): wp_ob_end_flush_all('')
4 /home/saunapla/web/live/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
5 /home/saunapla/web/live/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
6 /home/saunapla/web/live/public_html/wp-includes/load.php(1144): do_action('shutdown')
7 [internal function]: shutdown_action_hook()
8 {main}
thrown in /home/saunapla/web/live/public_html/wp-content/plugins/accessibility-plus/accessibility.php on line 110
Hi,
This is an error that is showing up occasionally in the debug log. I ended up putting if(!empty($dom)){} around it as a quick fix. That seems to have resolved it so far.
Thanks,
Toby
function easywpstuff_assesplus_add_aria_labels_to_buttons($html) {
$dom = lhb_str_get_html($html, false, true, 'UTF-8', false, PHP_EOL, ' ');
if(!empty($dom)){
$buttons = $dom->find('button');
foreach ($buttons as $button) {
if (!trim($button->plaintext) && !$button->getattribute('aria-label')) {
$child_elements = $button->find('*');
if (empty($child_elements)) {
$button->setattribute('aria-label', 'button');
} else {
$button->setattribute('aria-label', 'button');
}
}
if (!$button->getattribute('aria-label')) {
$svg = $button->find('svg',0);
$path = $button->find('path',0);
$span = $button->find('span',0);
if($svg && $path){
$button->setattribute('aria-label', 'button');
}elseif($span){
$span_text = trim($span->plaintext);
if($span_text){
$button->setattribute('aria-label', $span_text);
}
}
}
}
return $dom->save();
}
}
]]>I hope you are fine , I really appreciate your plugin and it’s working well with my case. The only problem that I find It is the Loadmore button is hided even where there are still records in the category ( I noticed that the +[count] variable is equal to ZERO and there are others records ).
SO can you please help me to resolve the problem
Many Thanks In advance
Have a nice day
]]>$BotanicalName = 'xLinda Buxtonus';
$params = array(
'where' => "t.post_title = '{$BotanicalName}'",
'limit' => 1,
);
echo MyDump($params, '$params for find()');
$Pod = pods('plant', $params, true );
if ( $Pod->exists() )
echo "<p>Exists";
else
echo "<p>DOES NOT EXIST!";
“exists()” always returns false. I can dump the object returned and can see the difference from when something is returned or not but don’t know how to tell programatically if it failed.
I have set “strict” mode to true so it should return a boolean false but it never does.
What I want to do is check if the object exists, update it if so, otherwise create and update a new object.