Wordpress - Storage on Cloudinary Only not importing to Media Library
Hi team,
Love the new wordpress plugin. The option to store the images in Cloudinary only is perfect (as this is why most of us move to Cloudinary so we don't have to host images on our own servers taking up the space!)
I've recently installed wordpress and plugins on a new server for my site. I've set it to Cloudinary only.
When I "Add" media to a Wordpress post, and go through cloudinary to select the image I want, it does a little loading sign and then shows the title... but then never loads the image and it's not selectable to enter into the post at any stage. The media library shows a blank grey box as the image.
When I refresh, select a new post / page, the same thing displays in the media library when I try to insert an image.
If I select the image and click on insert, it adds the following code into the classic editor...
<img class="alignnone size-medium wp-image-10491" alt="" />
As you can see, there's no src listed. I would expect to see src="res/cloudinary etc...." in it if it's just linking to the cloudinary servers?
I'd appreciate any help.
Thanks
-
Official comment
Hi Al,
Can you please verify if wp_cloudinary_relationships table has been created?
Regards,
Anthony
-
I can confirm that wp_cloudinary_relationships has not been created. Would this be because my database is not using wp as the prefix to the wordpress tables?
0 -
Hi Al,
To be more general, the error occurs due to a limitation of the DB engine which depends on your MySQL version.
Here is the code to use for any MySQL version:
CREATE TABLE IF NOT EXISTS {{wp_prefix}}_cloudinary_relationships (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
post_id bigint(20) DEFAULT NULL,
public_id varchar(500) DEFAULT NULL,
parent_path varchar(500) DEFAULT NULL,
sized_url varchar(500) DEFAULT NULL,
width int(11) DEFAULT NULL,
height int(11) DEFAULT NULL,
format varchar(12) DEFAULT NULL,
sync_type varchar(10) DEFAULT NULL,
post_state varchar(12) DEFAULT NULL,
transformations text DEFAULT NULL,
signature varchar(5) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY sized_url (sized_url(190)),
KEY post_id (post_id),
KEY parent_path (parent_path(190)),
KEY public_id (public_id(190)),
KEY sync_type (sync_type)
) ENGINE=INNODB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ciYou will need to replace the {{wp_prefix}} with the prefix in your database, by default it is wp but it can change depending on your setup. So before running the query, I recommend checking your prefix and then filling the value in the query above.
Regards,
Wissam
0 -
Thanks Wissam.
I have used the SQL code you sent above to create the table in the database. I have used my custom wp prefix and it is created just fine.
I then tried uploading the images as before, and get the same result as before as well.
Checking the table in the database, it remains empty.
0 -
Hi Al,
As this would require us to get more info by looking at the logs of your app environment, may I request you to please help send us the php-error.log file through a support ticket here (https://support.cloudinary.com/hc/en-us/requests/new).
Thanks in advance.
0 -
Hi Eric. I can't find any php-error.log file on my server anywhere. I've gone and selected for php to log the errors... But I've got no idea where about's this file is. I've done a quick search for error files and the only one I can find is the Wordpress one.
0 -
Hi Al,
I would just like to go back if you can provide us a screenshot of tables in your Wordpress database as a sanity check. We would like to ensure that the prefix is `wp`.
Thank you,
Anthony
0 -
Hi Anthony. No; I’ve used a custom prefix in my database for security measures.
0 -
Hi Al,
As the table was created, but it is not populated. I would suggest the following trick to disable and then enable the Cloudinary Plugin and then please check if the table got populated once added an asset to page/post.
Thanks,
Wissam
0 -
Hi Wissam,
I had to create the db table manually.
As such, I have done the following:
Disabled, then re-enabled the plug-in on the main site: No change, still has the same error.
Disabled and then re-enabled on the Network MU site: No change, still the same error.
Disabled, deleted, re-installed Cloudinary plugin, re-enabled on individual site: No change. Still getting the same error.Still needing some advice here folks. Thanks for your patience.
0 -
Hi Al,
Thank you for your feedback.
As we would like to troubleshoot your specific account and configuration,
Could you please create a ticket to support@cloudinary.com with the system report attached as explained here? Could you also please, before generating the report, make sure that you include images in your report as explained here?
In case it will be necessary, will you be willing to provide us with temporary access to a sandbox environment of your site where we can take a look and debug if needed?
Thanks,
Wissam
0
Post is closed for comments.
Comments
11 comments