Git Product home page Git Product logo

Comments (5)

benjamminf avatar benjamminf commented on August 21, 2024

Hey @wfendler, this is a common problem and one that depends entirely on how the server is configured. If you haven't already, upgrade to EA 0.3.4 which was released yesterday. This (finally) adds logging to the plugin which I can use to help diagnose the problem.

This behaviour indicates that the embedded asset JSON file can't be read for some reason, so craft.embeddedAsset.fromAsset(asset) is returning null. What that reason is really depends on your PHP and server configs. With 0.3.4 installed, try rendering one of your templates, then find the file craft/storage/runtime/logs/embeddedassets.log and upload it here, or send it to me (benf) on Craft's Slack channel. Or you can go through the log yourself and see if you spot any errors.

from craft-embedded-assets.

wfendler avatar wfendler commented on August 21, 2024

Cool, looks like I've been using 0.3.4 the whole time. So I've got some logs but it looks like the only thing being logged is a bunch of [info] [plugin] Reading file with curl. I'll send it over on Slack though in case I'm missing anything.

from craft-embedded-assets.

wfendler avatar wfendler commented on August 21, 2024

Just tried adding a new embed on the server and that's not working either. So the transfer of data isn't what went wrong. There's something up with the server environment. Anything come to mind that I should check into first?

Asset folder has 755 permissions. The json files inside of that are 664.

When I look at the embed assets in the CP it's getting all of the titles right. So it must be reading those json files (although the thumbnail images are missing for the ones I've moved over).

I'm using ServerPilot + Digital Ocean.

Here's my basic server info from Craft:
screen shot 2016-09-12 at 11 30 53 am

Let me know if any of the php info would be helpful. Too long to upload. For now I'll continue to do some poking around to see what I can come up with. Thanks for any help!

from craft-embedded-assets.

leevigraham avatar leevigraham commented on August 21, 2024

When I look at the embed assets in the CP it's getting all of the titles right. So it must be reading those json files (although the thumbnail images are missing for the ones I've moved over).

Pretty sure titles are being pulled from the DB not from the json

from craft-embedded-assets.

awcross avatar awcross commented on August 21, 2024

After looking into this, I found the problem to be that the site url and server_name variables are different due to the fact I'm running Vagrant with port forwarding.

Basically, the readAssetFile method is grabbing the site url localhost:8080 instead of the server_name set to localhost. Because of that, curl can't find the file on the server.

Is it possible to use craft()->request->getServerName() instead or fallback in some way?

from craft-embedded-assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.