Opened 10 years ago
Closed 10 years ago
#33097 closed defect (bug) (duplicate)
Changed URLs in image gallery after Update to 4.2.3
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.2.3 |
| Component: | Shortcodes | Keywords: | |
| Focuses: | Cc: |
Description
After update from 4.2.2 to 4.2.3 images in gallery are not found anymore. If there is only one image, the popup works. I use the Magnific popup Javascript with the following code in functions.php:
/* Name: magnific_popup */
add_action( 'genesis_entry_content', 'dynamik_magnific_popup_hook_box', 10 );
function dynamik_magnific_popup_hook_box() {
dynamik_magnific_popup_hook_box_content();
}
function dynamik_magnific_popup_hook_box_content() { ?>
<script>
jQuery(document).ready(function() {
jQuery('.image-gallery').magnificPopup({
delegate: 'a',
type: 'image',
closeOnContentClick: false,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
image: {
verticalFit: true,
},
gallery: {
enabled: true
},
zoom: {
enabled: true,
duration: 300, // don't foget to change the duration also in CSS
opener: function(element) {
return element.find('img');
}
}
});
});
</script>
<?php
}
This worked fine over many WP versions. But now, after update to 4.2.3 the image urls have changed. Please hover the mouse over an image there:
http://www.nifcoktw.com/news/altstadtfest-weissenburg-2015/
Instead of image (popup) link
http://www.nifcoktw.com/wp-content/uploads/2122960_plakataltstadtfest.jpg
the link is now:
www.nifcoktw.com/wp-content/uploads/2122960_plakataltstadtfest.jpg%20http://www.nifcoktw.com/wp-content/uploads/1-tanzstudio-1500x630.jpg%20http://www.nifcoktw.com/wp-content/uploads/10407673_1117032024980323_7339245485233745838_n.jpg%20http://www.nifcoktw.com/wp-content/uploads/11742846_1117032074980318_4152939575710077527_n.jpg%20http://www.nifcoktw.com/wp-content/uploads/11705138_1096677697026938_5221459161876418896_n.jpg%20http://www.nifcoktw.com/wp-content/uploads/10502525_428888893962737_2216928929966320340_n.jpg%20http://www.nifcoktw.com/wp-content/uploads/11752457_1117316254951900_7053245751125117208_n.jpg
But if there is only 1 image in the gallery, the problem does not exist:
http://www.nifcoktw.com/news/nifco-ktw-nifco-ktw-america-in-der-presse/
I tested this again on local environment. Changed nothing else, then uploading to 4.2.3. Before update all worked fine, after update the images have bad links.
PS: I can't choose below in dropdownmenu version 4.2.3 (only 4.2.2 or trunk), so I chosed 4.2.2, but it should be 4.2.3.
Change History (3)
#2
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Version changed from 4.2.2 to 4.2.3
#3
@
10 years ago
- Keywords needs-patch removed
- Milestone Future Release deleted
- Resolution set to duplicate
- Status changed from new to closed
@La Geek allowed me to take a look at the post content. It uses shortcodes all over the place and is similiar to the one reported in #33102. Closing as a duplicate.
When I override the shortcodes.php of 4.2.3 with the shortcodes.php of 4.2.2 the problem is solved.
There are a lot of troubles with the shortcodes.php file, please see there:
https://wp-types.com/forums/topic/types-shortcode-breaks-after-wordpress-4-2-3-autoupgrade/page/2/#post-319201
Since I don't know, if the changes in includes/shortcodes.php are security fixes, I moved back to the file version 4.2.3. But hopefully a fix will be available soon.
And there is an official blog post about the issues:
https://wp-types.com/2015/07/wordpress-4-2-3-fixes-a-security-problem-but-breaks-sites-with-shortcodes/