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

localhost access to HashOver during the development of a website #301

Open
myFrank-wk opened this issue Apr 8, 2021 · 3 comments
Open

Comments

@myFrank-wk
Copy link

Hello,

Thank you for making HashOver available as open source. I installed HashOver on a subdomain - comments.my-domain.de including MySQL access. HashOver is accessed via - my-domain.de. This works well in live operation, but not in local development. Is there a way to access the externally installed HashOver during local development?

Access from my-domain.de to HashOver looks like this:
<div id="hashover"></div>
<script type="text/javascript" src="https://comments.my-domain.de/hashover/comments.php"></script>`

The settings.json has the following content, among others:
{ "allowed-domains": ["my-domain.de","localhost:1313"], "supports-multisites": true, "local-metadata": true, ... }

Best regards
Frank

@jacobwb
Copy link
Owner

jacobwb commented Apr 14, 2021

How is it not working? Is it showing different comments or showing an error? You should be able to use an externally hosted HashOver in local development, yes.

@myFrank-wk
Copy link
Author

I use the static page generator Hugo in version 0.82. In the local environment, the HTML div tag with the ID hashover is simply not filled. No error message. In the Chrome browser the HTML code looks like this:

<script type="text/javascript" src="https://comments.my-domain.de/hashover/loader.php"></script>
<script async="" src="https://comments.my-domain.de/hashover/comments.php?cfg[language]=de_DE&amp;cfg[theme]=default-borderless"></script>
<div id="hashover"></div>

@myFrank-wk
Copy link
Author

Sorry, didn't look properly. The following error output in the chrome browser:

[Deprecation] 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.

Access to XMLHttpRequest at 'https://comments.my-domain.de/hashover/backend/comments-ajax.php' from origin 'http://localhost:1313' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost:1313' that is not equal to the supplied origin.

Uncaught TypeError: Cannot read property '1' of null at HashOverConstructor.jsonp (comments.php?cfg[language]=de_DE&cfg[theme]=default-borderless:8) at onError (comments.php?cfg[language]=de_DE&cfg[theme]=default-borderless:8) at XMLHttpRequest.xhr.onreadystatechange (comments.php?cfg[language]=de_DE&cfg[theme]=default-borderless:8)

comments.php?cfg[language]=de_DE&cfg[theme]=default-borderless:8 POST https://comments.my-domain.de/hashover/backend/comments-ajax.php net::ERR_FAILED

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