Open brycekirk opened 6 years ago
Embedded assets are JSON files, so that's all good. It seems reading the source of the JSON files is the problem. This might be caused by file permissions. Your assets may have had their read permissions changed when uploading them. Make sure they're set to 0755
and try again.
I changes the file permissions (all assets now listed as -rwxr-xr-x
in terminal) and the problem persists :(
Can you check the log file for the plugin under the storage/logs directory and see if it's reporting any issues?
Can't find storage/logs, but on the server there's a phperrors.log under craft/storage/runtime/logs. Attached. phperrors.log
I've got the following chunk of code to output the asset using this plugin if it's embedded, and insert the link into an HTML video tag if it's a local file:
`{% for asset in block.video %} {% set embed = craft.embeddedAssets.fromAsset(asset) %} {% if embed %} {{ embed.safeHtml|raw }} {% else %}
{% endfor %}`
It works perfectly on my local MAMP server, and on my staging site, recognizing the asset as embedded and outputting the proper code. When I push to the live site (hosted with Media Temple), however, it's not recognizing the asset as embedded, and outputting the code under "else" resulting in the follow broken code:
<source src="/assets/vid/embed_Sporting-Life-Powder-Matt.json" type="application/json">
I've double checked the template on the server, it's the exact same as my working local version. Changing the server's PHP version to 7 doesn't fix it. I don't understand what could be happening here. I've also tried this:
{% if craft.embeddedAssets.isEmbedded(asset) %}
Which, again, works locally but not on the live site. This is driving me nuts.
Edit: For some reason, the live site is uploading them as JSON instead of embedded assets Local site:
Live site: