Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder Images Broken After Upgrade to 3.0 #596

Closed
themak1985 opened this issue Jun 13, 2023 · 12 comments
Closed

Placeholder Images Broken After Upgrade to 3.0 #596

themak1985 opened this issue Jun 13, 2023 · 12 comments
Milestone

Comments

@themak1985
Copy link

themak1985 commented Jun 13, 2023

Upgraded to 3.0 and plagued with image issues - on latest wordpress civi 5.61.3 - no image placeholder will show up.

Cleared cache, reloaded permalinks,

Screenshot 2023-06-13 at 10 57 18 AM

I get this error in console.
Unable to preventDefault inside passive event listener invocation.
I have disabled and enabled it again, but no luck.

This is the path found for an image using devtools.

https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmosaico%2Fimg%2Fplaceholder&method=placeholder&params=534%2C150&text=w534

I get the following error: "Internal GD font () not available. Use only 1-5."

@bannyachanda
Copy link

Hi,

We are getting a similar error: "Internal GD font () not available. Use only 1-5.". Uploaded images are not showing in the template.
We are using CiviCRM version 5.60.0 within Wordpress version 6.2.2 and have installed Mosaico Extension version 3.0.1686233438.

@mattwire
Copy link
Collaborator

Fixed in 3.1

@mattwire mattwire added this to the 3.1 milestone Jun 21, 2023
@bannyachanda
Copy link

bannyachanda commented Jun 22, 2023

Hi @mattwire ,
After updating the version to 3.1, the error "Internal GD font () not available. Use only 1-5." is not showing anymore. But the image placeholder issue is still there. Uploaded images are not showing in the template. See Screenshot.

Screenshot 2023-06-22 at 10 52 10 AM

@mattwire
Copy link
Collaborator

@bannyachanda the placeholder images are the "drop an image here 300 x 200" images which look like are working in your screenshot.
For the other images.. what happens if you upload a new image? Also try experimenting with the URL that gives the 404 in the browser console - open it in another window and see if you can see the problem with the path - the filename should exist in the same place on the filesystem.

@bannyachanda
Copy link

@mattwire
Sorry, the screenshot I am showing is for uploaded images. I have uploaded the image, image upload is working perfectly but it is not displaying in the template. Also, the uploaded images are there in the upload directory. I can access the image src from the browser directly.
The problem happens when it's trying to display the image in the template with the URL "http://civicrm.memberlounge.ca/wp-admin/mosaico/img/?src=..."

@themak1985
Copy link
Author

@bannyachanda - I upgraded and do not have the same issues as you do. 3.1 fixed the issue for me.

I suggest doing the following wordpress/civicrm troubleshooting.

clear civicrm cache, reload wordpress permalinks, clear civicrm cache again to be safe, create a new template.

@bannyachanda
Copy link

Hi, @themak1985, Thanks for your suggestions.
I already did all of the things you mentioned. But still, it's not working. Even there is no error in the log files.

@bannyachanda
Copy link

Hi @mattwire,

I have figured out the problem. The image is loading from this in my Mosaico template https://mysite.com/mosaico/img/?src=.... but it should be loaded from https://mysite.com/civicrm/mosaico/img/?src=....

Can you please suggest to me how can I solve the problem?

@themak1985
Copy link
Author

@bannyachanda are your resource URLs properly set?

@bannyachanda
Copy link

bannyachanda commented Jun 23, 2023

@themak1985 Yes I think so. Here it is:
Screenshot 2023-06-23 at 12 28 39 PM

@deepak-srivastava
Copy link
Collaborator

@bannyachanda For some reason your urls gone wrong.

You could try replaceurl api to correct them. E.g:

cv api MosaicoTemplate.replaceurls from_url="https://mysite.com/mosaico/img" to_url="https://mysite.com/civicrm/mosaico/img"

Or

drush cvapi MosaicoTemplate.replaceurls from_url="https://mysite.com/mosaico/img" to_url="https://mysite.com/civicrm/mosaico/img"

@bannyachanda
Copy link

Hi @deepak-srivastava, I did it. But it didn't resolve the problem. After doing it, I have got this output:
{
"is_error": 0,
"version": 3,
"count": 0,
"values": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants