bjrnet21
Forum Replies Created
-
Forum: Plugins
In reply to: [Social Sharing Plugin - Social Warfare] Update crashing sitesThere it is incompatibility with the WP-statistics plugin where it breaks that plugin.
I just deactivated the “Social Warfare” plugin AND the wp-statistics plugin started working again.
Yes, wp-statistics is broken again.
Statistics overview page just keeps “spinning” and never loads. Not sure if it keeping track of visitors at the moment.
I think I got my issue resolved. Previously I used code such as:
if ($Month == “” AND $Year == “”) {$tdih = “[tdih_tab day= ” . $Day . “]”;} else if ($Day == “” AND $Year == “”) {$tdih = “[tdih_tab month= ” . $Month . “]”;} else if ($Month == “” AND $Day == “”) {$tdih = “[tdih_tab year= ” . $Year . “]”;} else if ($Month == “” AND $Day AND $Year) {$tdih = “[tdih_tab day= ” . $Day . ” year= ” . $Year . “]”;} else if ($Day == “” AND $Month AND $Year) {$tdih = “[tdih_tab month= ” . $Month . ” year= ” . $Year . “]”;} else if ($Year== “” AND $Month AND $Day) {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . “]”;} else {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . ” year= ” . $Year . “]”;}
echo do_shortcode($tdih);I changed it to:
if ($Month == “” AND $Year == “”) {$tdih = “tdih_tab day= ” . $Day;} else if ($Day == “” AND $Year == “”) {$tdih = “tdih_tab month= ” . $Month;} else if ($Month == “” AND $Day == “”) {$tdih = “tdih_tab year= ” . $Year;} else if ($Month == “” AND $Day AND $Year) {$tdih = “tdih_tab day= ” . $Day . ” year= ” . $Year;} else if ($Day == “” AND $Month AND $Year) {$tdih = “tdih_tab month= ” . $Month . ” year= ” . $Year;} else if ($Year== “” AND $Month AND $Day) {$tdih = “tdih_tab month= ” . $Month . ” day= ” . $Day;} else {$tdih = “tdih_tab month= ” . $Month . ” day= ” . $Day . ” year= ” . $Year;}
echo do_shortcode(‘[‘ . $tdih . ‘]’);Notice that I removed all the “[” and “]” from the if block and made them a part of the do_shortcode call. That seemed to placate the plugin. The plugin breaks when you try something like { $A = “[xxxxx]”; } . I guess it doesn’t like the [].
I’ll continue to test a bit before I deploy to my live site. Thank you for your quick response and help in this manner.
In case you are wondering… I maintain the largest blackjack historical database. More information at blackjackreview.com/wp/historical-events/.
I think I have narrowed down the code that the plugin is having a problem with:
if ($Month == “” AND $Year == “”) {$tdih = “[tdih_tab day= ” . $Day . “]”;} else if ($Day == “” AND $Year == “”) {$tdih = “[tdih_tab month= ” . $Month . “]”;} else if ($Month == “” AND $Day == “”) {$tdih = “[tdih_tab year= ” . $Year . “]”;} else if ($Month == “” AND $Day AND $Year) {$tdih = “[tdih_tab day= ” . $Day . ” year= ” . $Year . “]”;} else if ($Day == “” AND $Month AND $Year) {$tdih = “[tdih_tab month= ” . $Month . ” year= ” . $Year . “]”;} else if ($Year== “” AND $Month AND $Day) {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . “]”;} else {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . ” year= ” . $Year . “]”;}
As mentioned before, this code worked before.
[tdih xxxxxx] is short code for the “This Day in History” plugin.
Can Woody Snippets handle other short codes still?
You asked, “Do you use opening and closing tags in php snippets?”
I posted the entire snippet above exactly as it is in the snippet.
It appears that even when I comment out the entire snippet the page breaks. When I remove the code and use an empty snippet it loads the page.
Could your plug-in have a problem in parsing the text in the snippet even when commented out?
Thank you for your help in this manner. I’ll (we will) figure this out.
Now I am noticing the following error:
Parse error: syntax error, unexpected ‘<‘, expecting end of file in /home/blackj90/staging/2/wp/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(47) : eval()’d code on line 3
I only have 1 snippet enabled and I get this too:
Parse error: syntax error, unexpected ‘tdih_table’ (T_STRING) in /home/blackj90/staging/2/wp/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(47) : eval()’d code on line 2
… and you are right. I don’t see tdih_table anywhere in my code in this snippet or any other snippet I have.
I am using the standard “” quotes. When I copied and pasted the code the forum must have converted it. Here is my code:
$Month = $_GET[“Month”]; $Day = $_GET[“Day”]; $Year = $_GET[“Year”]; if ($Month == “” AND $Day == “” AND $Year == “”) { $Month=”9″; $Day=”2″; $Year=”1956″; }
if ($Month == “” AND $Year == “”) {$tdih = “[tdih_tab day= ” . $Day . “]”;} else if ($Day == “” AND $Year == “”) {$tdih = “[tdih_tab month= ” . $Month . “]”;} else if ($Month == “” AND $Day == “”) {$tdih = “[tdih_tab year= ” . $Year . “]”;} else if ($Month == “” AND $Day AND $Year) {$tdih = “[tdih_tab day= ” . $Day . ” year= ” . $Year . “]”;} else if ($Day == “” AND $Month AND $Year) {$tdih = “[tdih_tab month= ” . $Month . ” year= ” . $Year . “]”;} else if ($Year== “” AND $Month AND $Day) {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . “]”;} else {$tdih = “[tdih_tab month= ” . $Month . ” day= ” . $Day . ” year= ” . $Year . “]”;}
echo do_shortcode($tdih);Running some tests and it appears that even the first PHP line in the snippet:
$Month = $_GET[“Month”]; $Day = $_GET[“Day”]; $Year = $_GET[“Year”]; if ($Month == “” AND $Day == “” AND $Year == “”) { $Month=”9″; $Day=”2″; $Year=”1956″; }causes it to break.
I also tried “commented out” all the PHP in this snippet with // and the page still breaks. If I delete the snippet and put in something simple such as echo “TEST”; it works.
On the page that breaks I simply have several snippets in the HTML similar to [wbcr_php_snippet id=”xxxxxx”].
I’ve cleared all my cache.
The snippet code that appears to break is:
$Month = $_GET["Month"]; $Day = $_GET["Day"]; $Year = $_GET["Year"]; if ($Month == "" AND $Day == "" AND $Year == "") { $Month="9"; $Day="2"; $Year="1956"; } if ($Month == "" AND $Year == "") {$tdih = "[tdih_tab day= " . $Day . "]";} else if ($Day == "" AND $Year == "") {$tdih = "[tdih_tab month= " . $Month . "]";} else if ($Month == "" AND $Day == "") {$tdih = "[tdih_tab year= " . $Year . "]";} else if ($Month == "" AND $Day AND $Year) {$tdih = "[tdih_tab day= " . $Day . " year= " . $Year . "]";} else if ($Day == "" AND $Month AND $Year) {$tdih = "[tdih_tab month= " . $Month . " year= " . $Year . "]";} else if ($Year== "" AND $Month AND $Day) {$tdih = "[tdih_tab month= " . $Month . " day= " . $Day . "]";} else {$tdih = "[tdih_tab month= " . $Month . " day= " . $Day . " year= " . $Year . "]";} echo do_shortcode($tdih);- This reply was modified 7 years, 4 months ago by bjrnet21.
Just upgraded my site to the latest WP 5.0.3 and the latest Twenty Fourteen theme update 2.5. All plugins are up to date. Site appears to be working fine.
I am still getting this PHP Warning many times each day.
I could ignore it, but I would like to fix it.
Any ideas?
Well, I attempted to change under “General Settings” for WordPress:
WordPress Address (URL)
Site Address (URL)… as this didn’t reflect my staging address.
After saving, it forced me to log back in. The settings (URLs) were set back to their original entries. I guess it didn’t like me changing this.
BUT…. after reloading my home page the Social Warfare icons magically reappeared.
Woo hoo!
I have tried clearing cache. I am using a staging site so the only cache plugins I have are autoptimize and SG optimizer which were both cleared. I do use cloudflare and supercacher but they are NOT enabled for this staging site.
The Social Warfare plugin worked fine before the WP 5 upgrade.
Will continue to troubleshoot.
Thank you for responding.
Just found this on the Warfare site:
https://warfareplugins.com/support/my-icons-are-showing-letters-instead-of-the-proper-social-icons/
Sounds like a caching issue.
I think this might have been an SG Optimizer (from Siteground) plugin conflict / problem.
I disabled SG Optimizer and then WP Statistics worked again and the Visual / Text modes problem was resolved.