#24544 closed defect (bug) (invalid)
404 error when using 2 scripts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Hello,
I need to use this code in my functions.php folder:
function wp_jquery_cdn_init(){ if (!is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"); wp_enqueue_script('jquery'); } } add_action('init', 'wp_jquery_cdn_init');
and this code in the post or page I want my Iframe:
<script type="text/javascript" src="http://energieleverancierkiezen.energievergelijken.nl/Scripts/iframe/widget.js"></script><iframe src="http://energieleverancierkiezen.energievergelijken.nl/nl/input/widget/" height="325" width="332"></iframe>
and im using the "iframe" plugin to let things work, but this plugin is not important for this bug. This is my website: http://www.energieleverancierkiezen.net/ when I try to use a plugin, for instance a social widget into my homepage it causes it to break.
I have on all my posts a social widget at the bottom of the post, for instance: http://www.energieleverancierkiezen.net/energieleveranciers-kiezen/
When I also activate this on pages, my homepage will break, because of this script on my homepage:
<script type="text/javascript" src="http://energieleverancierkiezen.energievergelijken.nl/Scripts/iframe/widget.js"></script><iframe src="http://energieleverancierkiezen.energievergelijken.nl/nl/input/widget/" height="325" width="332"></iframe>
But for letting that script work, I need also this script, like I said before:
<script type="text/javascript" src="http://energieleverancierkiezen.energievergelijken.nl/Scripts/iframe/widget.js"></script><iframe src="http://energieleverancierkiezen.energievergelijken.nl/nl/input/widget/" height="325" width="332"></iframe>
I've totally no clue why this problem occurs. I talked with the author of my theme, I talked with different plugin authors, but nobody has a clue why my homepage breaks. Everybody thinks it is something with wordpress.
My website only breaks on pages where I add the iframe (this code: <script type="text/javascript" src="http://energieleverancierkiezen.energievergelijken.nl/Scripts/iframe/widget.js"></script><iframe src="http://energieleverancierkiezen.energievergelijken.nl/nl/input/widget/" height="325" width="332"></iframe>
and a social plugin or my live chat)
Thanks in advance,
Niels
Attachments (3)
Change History (6)
#2
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#3
@
12 years ago
Hello Sergeybiryukov,
thanks for your fast reply. I did the steps on a clean install: http://afvallenzwangerschap.nl/
The only things I did:
- adding this code to my functions.php:
function wp_jquery_cdn_init(){
if (!is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js");
wp_enqueue_script('jquery');
}
}
add_action('init', 'wp_jquery_cdn_init');
- adding this code to my homepage:
function wp_jquery_cdn_init(){
if (!is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js");
wp_enqueue_script('jquery');
}
}
add_action('init', 'wp_jquery_cdn_init');
- install the "iframe" plugin
- downloading 2 social plugins and tried them both, with resulting my website to break. I added some screenshots of the proces.
You can also try it by yourself and you will see that your website breaks.
Please try the support forums for troubleshooting: http://wordpress.org/support/.
Feel free to reopen with steps to reproduce on a clean install if it turns out to be a bug in core.