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

Unable to see image in Opening Crawl feature #136

Closed
Dipnotz opened this issue Feb 11, 2023 · 11 comments · Fixed by #137
Closed

Unable to see image in Opening Crawl feature #136

Dipnotz opened this issue Feb 11, 2023 · 11 comments · Fixed by #137
Assignees
Labels
bug Something isn't working

Comments

@Dipnotz
Copy link

Dipnotz commented Feb 11, 2023

Running this configuration (hosted on Forge)
Screenshot 2023-02-10 at 5 58 27 PM

Opening crawl configured as this - text runs perfectly, scene pans to a blank star field. Tried with png file, jpg file.
Screenshot 2023-02-10 at 6 01 50 PM

Settings in Opening Crawl UI settings manager are defaults except for music start time.

@wrycu
Copy link
Owner

wrycu commented Feb 11, 2023

Does it work if you don't edit the file at all? Are you using Forge or another hosting service, by any chance?

@wrycu wrycu added the bug Something isn't working label Feb 11, 2023
@bheiskell
Copy link
Collaborator

Can you open up the web developer tools and see if any errors show up in the console while running?
Could you also include a copy of the HTML of the Journal by clicking the <> button and posting it into this issue?

@Dipnotz
Copy link
Author

Dipnotz commented Feb 11, 2023

@wrycu Yes, I'm using Forge. Same problem if not editing the default file at all. I will try on the standalone app in just a bit (on different computer right now)

Just tested on self-hosted standalone. Worked as expected. So it's either a Forge issue or a Forge + me issue.

@Dipnotz
Copy link
Author

Dipnotz commented Feb 11, 2023

@bheiskell HTML is below. Doesn't seem to be throwing any errors:
Screenshot 2023-02-11 at 8 01 14 AM

Episode I

The Traitor's Gambit

It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn. . . . 

@bheiskell
Copy link
Collaborator

If you remove the following from the html does it start working again?

<span class="Apple-converted-space"> </span>

@Dipnotz
Copy link
Author

Dipnotz commented Feb 11, 2023

No luck. Here is the html now:

Episode I

The Traitor's Gambit

It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn...

@wrycu
Copy link
Owner

wrycu commented Feb 11, 2023

@Dipnotz can you re-post the HTML with the backticks before and after it?

Like this:

``` HTML ```

@Dipnotz
Copy link
Author

Dipnotz commented Feb 11, 2023

Absolutely.

<h2>The Traitor's Gambit</h2>
<p>It is a dark time in the galaxy. The evil Galactic Empire has spread from the Deep Core to the Outer Rim, and everywhere the Empire’s tyranny can be felt. Fleeing from the oppression of the Emperor’s minions, agents of Senator Bail Organa have run to a remote space station above Brentaal. Known to be a vocal opponent of the Empire, Organa may be the last hope of freedom in the galaxy. In the hopes of stopping these dissidents before they can reach the Senator, the Empire has alerted its forces on Sel Zonn Station, where the struggle for liberty rages on, and the first sparks of rebellion have begun to burn...</p>
<img src="https://assets.forge-vtt.com/63d15222404dcbbf2ad08ce7/worlds/dawn/images/Starbasecarida.jpg">```

@bheiskell bheiskell self-assigned this Feb 11, 2023
@bheiskell
Copy link
Collaborator

@Dipnotz

I don't know why yet, but the template being created is wrong.

This is what's created in my live environment:

<h1>Episode X</h1>
<h2>Episode Title</h2>
<p>Replace the h1 and h2 above with your episode and title. Then, replace this block of text with the paragraphs of your opening crawl. Lastly, the opening crawl will pan to the image below. Replace the image with a planet, ship, or simply remove the image entirely to pan to open space.</p>
<img src="modules/ffg-star-wars-enhancements/artwork/planet.png">

But the actual template used in the code is:

        "content": "<h1>Episode X</h1><h2>Episode Title</h2><p>Replace the h1 and h2 above with your episode and title. Then, replace this block of text with the paragraphs of your opening crawl. Lastly, the opening crawl will pan to the image below. Replace the image with a planet, ship, or simply remove the image entirely to pan to open space.</p><p><img src=\"modules/ffg-star-wars-enhancements/artwork/planet.png\"/></p>",

You can see the image in the template is wrapped with a paragraph tag. I'm guessing some sort of auto-reformatting is happening. When I try to manually fix it, the image moves out of the paragraph tag, leaving an empty one. This is likely some new post-save processing done by foundry. We can fix this in the main code, but unfortunately, I don't have a work around for you as the img extraction specifically looks for a paragraph tag with an img in it.

@bheiskell
Copy link
Collaborator

I confirmed my fix worked with your HTML content:
image

@Dipnotz
Copy link
Author

Dipnotz commented Feb 12, 2023

Thanks so much! Really appreciate the explanation and the time spent on this (and glad to know I'm not completely inept at following your instructions). Love the mod, as do my players.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants