Skip Navigation

[Resolved] Thumbnail size attribute not working with Types image field

This support ticket is created 8 years, 2 months ago. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 9 replies, has 3 voices.

Last updated by eSaner 8 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#361589

Louy, I replied to this post: https://toolset.com/forums/topic/thumbnail-size-attribute-not-working-with-types-image-field/#post-361588, but meant to mark it as unresolved, not resolved. Here is a copy of that last entry to keep the ticket going.

I have narrowed down the problem and have instructions for you to duplicate it. I believe the problem is related to how image fields use the guid field to calculate the attachment ID.

1. Create a new site (we'll call it Site 1) with a fresh install of WP 4.4.1, Twenty Sixteen theme, Types, WP-Views, and WP Migrate DB (the free version: https://wordpress.org/plugins/wp-migrate-db/)

2. Use Types to create a repeating image field for the Pages post type.

3. Create a view that displays the repeating image field and outputs the "Thumbnail" size. Allow the view to include the current page in the query results, and filter the view by Post ID. Enter the post ID for a page (create a page first, if none exists).

4. Edit the page that you chose to filter the view by. Add multiple images to the image field. Insert the view into the page. Look at the page on the frontend: the images should display correctly ("thumbnail" size).

5. Create another new site (we'll call it Site 2) the same WP version, theme and plugins as Site 1.

6. Copy the contents /wp-content/uploads directory from Site 1 and use it to replace the uploads directory in Site 2.

7. In Site 1, Go to Tools >> Migrate DB to export the database. Use the Site 2 url and file location in the Replace fields, and under Advanced Options make sure Replace GUID is unchecked. Export the database.

8. Delete all the tables in the Site 2 database (don't delete the database itself). Import the exported database file from Site 1 to the empty Site 2 database. I used phpMyAdmin.

9. In site 2, open the page with the view. The images will no longer show in "Thumbnail" size. They will show in full size.

10. Repeat steps 7-9, but this time make sure in step 7 that the Replace GUID field is checked. The images at Site 2 will now show correctly in "Thumbnail Size".

Please let me know if you can replicate this problem.

Thanks.

#361701

Dear eSaner,

Thanks for the details, I am trying to duplicate same problem in my localhost, will feedback if there is any found.

#362011
12.jpg
11.jpg

I followed the steps you mentioned above, but can not duplicate same problem in my localhost,
See the screenshot, 11.jpg from original website: hidden link
and screenshot 12.jpg from target website hidden link

Could you duplicate same problem in a test site, and fill below private detail box with login details and ftp access, also point out the problem page URL. I need test and debug it in a live website thanks

#364551

Thanks for the details, I assume we are talking about the problem images in section "Camp Friedenswald" of problem URL:
hidden link

Those images are from this page:
hidden link

Please check this:
in section "Gallery Image", click "Select Image" button in each image field, there isn't related images in the "Select image" window, it is empty, it is abnormal,

You can test it in your original website.

It seems to be a problem when you migrating your database, which is out the range of Toolset, As I suggest in previous posts, please try contact the plugin author of Migrate DB or check out our certified partners for it:
https://toolset.com/consultant/

#364754
select-image.jpg
gallery-image.jpg
ftp-images.jpg

Luoy, I do not quite understand. If I got to the Gallery Image field in the Homepage meta box for the page titled "Friedenswald" (id=6), I DO see urls in all the image fields, AND the images are in the Media Library (Select Image window) if I click the Select Image button.

See attached screenshots showing the Gallery Image fields with urls, the Select Image window showing the existing image, and a screenshot showing the original image and all thumbnails in the uploads directory.

1. Do you see something different?

2. Also, you never mentioned the error in your showcase site: https://toolset.com/site/turbobike-trainer/. The error is no longer there. It was there yesterday. What did you do to fix it?

#364861

Q1) Do you see something different?
As I mentioned above:
hidden link
Please check this:
in section "Gallery Image", click "Select Image" button in each image field, there isn't related images in the "Select image" window, it is empty, it is abnormal, which means there is some data lost when you migrate your database

Q2) What did you do to fix it?
Sorry, I forget this:
I modified your wp-config.php, and turn off the wordpress debug mode:

define('WP_DEBUG', true);
To:

define('WP_DEBUG', false);

#365121
select-image-2.jpg

Luoy,

1. As I mentioned above, there ARE images in the Select Image window, including the exact images linked in the Gallery Image fields (if you search for them). I've attached another screenshot showing exactly that. Please explain more clearly what you're seeing, or attach a screenshot.

2. I feel like we're talking in circles here...maybe another support person needs to join in...you had a page on the dev.wp-types.com website exibiting the same php error I had. So instead of figuring out why that error was appearing, you just turned off debugging? The reason I showed that link was so demonstrate that your site was having a similar problem to mine, and so that you could work on fixing the problem by looking more closely at that site.

#365418

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Luo passed this ticket to me. This is Minesh here and I'll take care of this ticket to help you further.

Please allow me to test steps you shared with us and I'll get in touch with you as soon as I know more.

#366135

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Please accept my apologies for the delay.

I've gone through all steps you mentioned with your first post and unfortunately, I can't able to reproduce the issue at this end.

I've tested this with all stable Toolset plugins + WP 4.4.2 and default theme 2016.

Please find following screenshots:

Site 1 view listing with image:
=> hidden link

Site 2 view listing with image:
=> hidden link

Site 2 image gallery popup [ when you click on upload button to upload new image using custom field ]:
=> hidden link

#368190

Thanks for looking at this, Minesh. I'll have to look into other reasons why it's not working.

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