Skip Navigation

[Résolu] Slow loading

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: Looping over repeating image field generates n^2 calls to Toolset_Utils::get_attachment_id_by_url

Solution: Update to the latest version of Types.

This support ticket is created Il y a 5 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : 

This topic contains 19 réponses, has 4 voix.

Last updated by Timothy Il y a 5 années et 3 mois.

Assisted by: Christian Cox.

Auteur
Publications
#1129249

Nothing to share at this time, I'll update the ticket to note that multiple Users have commented about the same issue.

#1132065

Just FYI.... We made a quickfix/work around with a shortcode, instead of the [wpv-for-each field] solution:

add_shortcode("show_toolset_images", "get_toolset_images");
function get_toolset_images() {
	$smallImages = explode("<em><u>hidden link</u></em>", types_render_field("woning-galerijfotos", array("size" => "thumbnail", "url" => true)));
	$largeImages = explode("<em><u>hidden link</u></em>", types_render_field("woning-galerijfotos", array("size" => "large", "url" => true)));

	array_shift($smallImages);
	array_shift($largeImages);

	$gallery = "";

	foreach($smallImages as $key => $imageUrl) {
		$gallery .= "<a href='<em><u>hidden link</u></em>".$largeImages[$key]."' data-fancybox='images' data-caption='".get_the_title()." ".types_render_field("woning-adres")."'>
			<img src='<em><u>hidden link</u></em>".$imageUrl."' class='imgGallery'>
		</a>";
	}

	return $gallery;
}
#1144469

My developers have assured me this problem will be resolved in Types 3.2. I'll keep you posted here as I receive more information.

#1155510

Types 3.2 has been released, and contains a fix for this issue. Please update to the latest versions of all Toolset plugins and let me know if the problem is not resolved. Thanks!

#1166210

This works, thanks so much!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.