Questions
Posted: 12 May 2021, 20:24
Hi,
First of all, thank you for creating Embed. I'm loving the simplicity and customizability while I work on getting my new website up and running quickly. I seem to be running into a couple issues that I can hopefully resolve before publishing my site.
My most prominent issue seems to be a bug with including an image description in an image's caption. My current Embed div is as follows:Any time I include "{{description}}" in the data-embed-popup-caption-template value, image captions appear to be blank. In addition to this, when I click on an image to make it fill the window, that image will show, and the next image will show when I click on the arrow, but none of the other images show on the screen until closing the 'full window' view and clicking on a different image. Both of these issues go away if I don't include "{{description}}" in the caption template value, and this includes cases where the value includes other options which work on their own, e.g. "{{basename}}<br>{{description}}". The image description does appear when I view the image in my site's Files page, so I don't think it's an issue with having no description.
My other issue might have more to do with Files, but I figured I would include it here to start, and if I should move this question to the Files section, I would be glad to do so.
In the Files index.php file around line 1125, the "basic post access security: XMLHttpRequest + post_hash created from server paths" if statement seems to be failing on my site, due to the "post('post_hash') !== md5(__FILE__ . $_SERVER['HTTP_HOST'])" check failing. I've briefly investigated this so far, and post('post_hash') is returning false, so I don't think the hash is being provided to the Files index.php endpoint. Unfortunately, my JS skills are nonexistent, and I can't find "post_hash" in the embed.min.js file, so I've hit a dead end in debugging this. For now, I can comment out this check, and it works. My only idea is that the site is currently without a domain, and so it would only have the IP address to work with for creating the post_hash.
If I can offer any other help in figuring this out, I'll be happy to do whatever I can.
First of all, thank you for creating Embed. I'm loving the simplicity and customizability while I work on getting my new website up and running quickly. I seem to be running into a couple issues that I can hopefully resolve before publishing my site.
My most prominent issue seems to be a bug with including an image description in an image's caption. My current Embed div is as follows:
Code
<div class="embed" data-embed-app="/files/index.php" data-embed-path="Folder" data-embed-popup-caption-template="{{description}}" data-embed-popup-map="false" data-embed-popup-caption-hide="false"></div>
My other issue might have more to do with Files, but I figured I would include it here to start, and if I should move this question to the Files section, I would be glad to do so.
In the Files index.php file around line 1125, the "basic post access security: XMLHttpRequest + post_hash created from server paths" if statement seems to be failing on my site, due to the "post('post_hash') !== md5(__FILE__ . $_SERVER['HTTP_HOST'])" check failing. I've briefly investigated this so far, and post('post_hash') is returning false, so I don't think the hash is being provided to the Files index.php endpoint. Unfortunately, my JS skills are nonexistent, and I can't find "post_hash" in the embed.min.js file, so I've hit a dead end in debugging this. For now, I can comment out this check, and it works. My only idea is that the site is currently without a domain, and so it would only have the IP address to work with for creating the post_hash.
If I can offer any other help in figuring this out, I'll be happy to do whatever I can.