Issue with generated names of custom widgets
Hi,
Something weird is going on with the names of my custom widgets (generated by the before_widget and after_widget code). I have two custom widget areas in my header. Here is the code that I used to create them: Code:
<?php bfa_widget_area('name=Header&cells=2&align_1=9&align_2=3&width_1=250&widget_2=700&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> Code:
<div id="\"text-4\"" class="\"header-widget" widget_text\"=""> Have I done something wrong in the code I used to create the widgets? Thanks! |
What is the url? it works fine for me, here is the result from the code copied and pasted
HTML Code:
<div id="text-79" class="header-widget widget_text"><div class="widget-title"><h3>title</h3></div> <div class="textwidget">blah blah</div> |
The url for the site (currently) is www.laurenacooper.com/AFAR
|
go to ato->export/import settings and export your settings, then attach them to a reply.
|
I have the exact same problem! But what is weird, this was fine before when I set it all up about a month or 2 ago. But I noticed the other day some of the styling in my header widgets wasn't working anymore. Upon investigating with firebug, I saw the crazy code. I have a test blog where I try things out, and noticed it's the same there--and I hardly have even plugins on that. It's only in the header widgets. And if I delete the custom header widgets & make new ones, it's the same problem.
Here's my URL: http://www.TraciBunkers.com/blog Here's an example: Code:
<td id="bottom_header_widget_area_3" align="right" valign="top"><div id=\"text-26\" class=\"bottom header widget area widget_text\"> |
have you added any new plugins?
what happens if you disable ALL plugins? I notice the first backslash shows up in this script HTML Code:
<script type='text/javascript'> |
On my test blog, I switched to twenty-ten theme, and the weird code was gone. So what does that mean?
Also, before I switched themes, I deleted the custom widgets, disabled ALL plugins, then created a new custom widget, and the new widgets had the weird code. But when I switched to twenty ten, the weird code was normal. Switching back to Atahualpa made the code wacky again. |
What is the php you are using to generate the widget area? IN the first post in this thread the code shown is.
PHP Code:
|
The code you are referring to is a different person. Here's mine:
Code:
<?php bfa_widget_area('name=bottom header widget area&cells=3&align_1=9&align_2=2&align_3=3&width_1=200&width_2=500&width_3=200&before_widget=<div id="%1$s" class="bottom header widget area %2$s">&after_widget=</div>'); ?> %page-right %bar1 Here's the latest one from my test blog--it's the same except the name for the custom widget. Code:
<?php bfa_widget_area('name=header-widget&cells=3&align_1=9&align_2=2&align_3=3&width_1=200&width_2=500&width_3=200&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?> %page-right %bar1 |
Quote:
when you switched to twenty ten - was the mailchimp code rendered correctly? |
@TraciBunkers or @crashley1784 - What version of Atahualpa are either of you running?
|
Forgive me if I have hijacked the thread. I thought hijacking was going off topic but I am having the same problem as the original poster. Let me know if you'd rather me start a new thread--to me that doesn't make sense because it would make more work for the moderators & people answering the questions or searching for a solution when they are having the same problem. Why not have it all in one place? Also, it seems like whatever we figure out might help the original poster.
On my test blog, I enabled ONLY the mailchimp plug-in, and it did show the backslashes in the twenty-ten theme. So that seemed like the culprit. Then on my main blog, I deactivated the mailchimp plugin, but it still showed back slashes in the Atahualpa theme in other places. If a plug-in is deactivated, but still installed, can it still cause problems? I'm using Atahualpa 3.7.3 and wordpress 3.3.1. |
(I only mentioned teh hijacking because Larry didn't notice you were not the original poster)
the fact that using twenty-ten and mailchimp shows the issue eliminates this as being a theme issue. It is quite possible that your host made some change to your server and that is causing it. Unfortunately, I have no idea what change they might have done. However I'll continue to try to help you. Could you install the plugin 'ServerBuddy by PluginBuddy' by PluginBuddy and activate it. If you go to the dashboard->tools->Serverbuddy and copy the info provided and send it, I'll compare it with what I have. If you feel it is too public, send it in a PM. |
You know, my web host did some maintenance last week, and moved me to a different server . . .
What should I ask them? I'm getting ready to move to a different host though. But if something got messed up/changed, do I need to get that resolved before I switch to a different host? I noticed some permissions got changed on my zen cart. I'll install the server buddy now. |
I have installed & run ServerBuddy. I'm not sure which section to copy, but in the first section, there is 1 warning for PHP Magic Quotes GPC--it says it's enabled & suggests for it to be disabled.
Parameter Suggestion Value Result Status Parameter Suggestion Value Result Status (?) PHP Version >= 5.2 5.2.17 OK (?) PHP max_execution_time >= 30 (seconds) 60 OK (?) WordPress Version >= 2.9.0 3.3.1 OK (?) MySQL Version >= 5.0.15 5.1.56 OK (?) Zip Methods exec (best) > ziparchive > pclzip (worst) exec, ziparchive, pclzip OK (?) AddHandler in .htaccess host dependant n/a OK (?) PHP Register Globals disabled disabled OK (?) PHP Magic Quotes GPC disabled enabled WARNING (?) PHP Magic Quotes Runtime disabled disabled OK (?) PHP Safe Mode disabled disabled OK (?) Operating System Linux Linux OK (?) PHP Memory Limit >= 128M 256M OK |
Quote:
|
This is the reply from my web host:
With PCI regulations being a factor on all of our new configured servers magic_quotes_gpc, magic_quotes_runtime has been deprecated as of PHP 5.3.0 and are terminated by default and not installed on the server itself and with these features being disabled on the old server they still existed. With the new servers they do not even exists and I ran a grep on magic_quotes and it confirms these are not present. However, CSS is strictly HTML or XHTML and not server side. With this if Magic Quotes was enabled it would not effect HTML or XHTML. Also, we just finished development on a Wordpress website on this same server using strictly XHTML and CSS without problems. With the server buddy plugin it may be reading a false positive as the files vs database with your software are intervened between 4 servers. Your website is not only hosted on one it is hosted on a total of 4 to meet the new PCI regulations but it does not determine the issues properly because it is trying to connect to all four at once which is not permitted due to strict firewall protection. |
what do you have in your .htaccess file?
|
Here's the one in my blog folder:
Code:
# BEGIN W3TC Browser Cache Code:
# BEGIN WordPress |
Hmmm, the only way I can think of proceeding is if I went in and was 'mucking' with your site. Unfortunately, I don't have the free time to do that at this point.
You could try posing this issue at wordpress.org and see if anyone will reply or even to the mailchimp developer. You have elimiated the themes from being the issue so maybe thy can be of some help. |
But even if I have mailchimp deactivated, I still get the backslashes with the Atahualpa theme, but not with Twenty-Ten. Does that still mean it's not a theme issue?
|
case 1: mail chimp active + atahualpa = back slash in mail chimp and atahualpa
case 2: mail chimp not active + atahualpa = backslash in atahualpa case 3: mail chimp active + twenty ten = backslash in mail chimp <-atahualpa not involved this tells me that it is not a mail chimp or theme issue but something with the environment. It could be a plugin, it could be a setting in the htaccess, it could be a php setting it could be a server setting. But it indicates to me that it is something specific to your environment. |
Ok, so just to be sure I understand . . . .
It's not a theme issue, but something else, even though in Atahulapa (with mailchimp deactivated), the widgets in the custom header widget that have the backslashes don't have them in Twenty-ten? ie: in twenty ten: id="text-28" but in Atahualpa: id=\"text-28\" |
I'm saying it is not theme related based on your statement that using the twenty ten theme you see the backslashes in the mail chimp code
and the fact that your host moved you to a new server and the problem just arose points to an environmental issue. |
Right, but with taking Mailchimp out of the equation, I'm still getting the backslashes with Atahualpa, but not Twenty-10. My web host said it's a theme issue & plugin since it goes away when I remove mailchimp plugin & switch themes.
I get what you are saying, but I'm at a loss for what to do about it. Maybe it'll be fine when I switch hosts? I guess I'll have to wait and see. I found this article on removing backslashes with php: http://php.net/manual/en/function.stripslashes.php But I'm not sure how to use any of the codes. I tried pasting a few of them (individually of course) into the functions.php file, but didn't have any luck. But I don't really know if the code needs to go in a particular place. I tried at the very beginning & very end without any luck. |
All times are GMT -6. The time now is 04:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.