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

Illegal document #15

Closed
MortenHofft opened this issue Sep 8, 2022 · 5 comments
Closed

Illegal document #15

MortenHofft opened this issue Sep 8, 2022 · 5 comments

Comments

@MortenHofft
Copy link

I just noticed that the document as a whole is illegal.

<!-- HEAD react and gbif component -->
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/2.1.1/mapbox-gl.min.css" integrity="sha512-j4BKLk7HB2Umio2SKGP4gh1L3jouxJDuBxcWoq4kf1fYIkJyXQUGxs9me8yz2wexxAIHIcQHzn64UfPIG232xQ==" crossorigin="anonymous" />
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/openlayers/6.1.1/ol.min.css' />

<!--dynamically include version running in environment-->
<script type="text/javascript" src="https://react-components.gbif.org/lib/gbif-react-components.js"></script>

<!DOCTYPE HTML>

<html>

	<head>
		
		<meta charset="UTF-8">
...
@jloomisVCE
Copy link
Contributor

Thanks for noticing. I think this is the same issue I am working on with our Wordpress consultant. WP and its PHP template implementation appears to prevent standard CSS-includes that reference the local file system. WP suggests that, rather than including these directly within PHP templates, they are included in a general location.

They sent me this link to understand: https://developer.wordpress.org/themes/basics/including-css-javascript/

I will make changes to our WP templates according to these rules and review this.

@jloomisVCE
Copy link
Contributor

@MortenHofft Friday I attempted to move these page-specific includes to the location recommended by Wordpress, and it did not work, so I restored our current configuration to keep the explorer functional. We have added a WP staging site, which I will use to test these changes this week.

So I understand, where do you see that this page is an illegal document? Thanks.

@MortenHofft
Copy link
Author

it is this page https://val.vtecostudies.org/gbif-explorer/
And I just look at the source code. right-click. choose View page source
A legal document should start with

<!DOCTYPE html>
<html ... and so on

@jloomisVCE
Copy link
Contributor

jloomisVCE commented Sep 12, 2022

Thanks. I assume the issue is the document tags outside the header and before the doctype declaration. My other options in WP are to (1) include those in the general site header or (2) move the includes below the php header. I tried #2 and it looks better.

@jloomisVCE
Copy link
Contributor

jloomisVCE commented Sep 12, 2022

@MortenHofft I think I've resolved this in two places - gbif-explorer and gbif-literature - with the above solution, so I'll close this. Let me know if I should reopen it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants