Page 2 of 5
Re: Resizer is not working
Posted: Wed Sep 27, 2023 9:36 am
by axew3
localhost cannot in effect be suffix of another:
it could be subdomain.localhost
localhost take the place of .com .net etc, the domain suffix.
You are not into localhost!
Re: Resizer is not working
Posted: Wed Sep 27, 2023 9:55 am
by madnnes
Hmm, In that case, what host should I specify then if it's not a localhost?
I have this in the overall_footer:
Code: Select all
document.domain = 'knigi-igri.net'; // MANDATORY! // Set/Change this value to fit your domain (example: axew3.com (or leave localhost if on localhost))
var wordpress_url_page_forum = 'https://knigi-igri.net/board'; // MANDATORY! // (DO NOT ADD/INCLUDE final slash here) Url that point to your iframed wordpress forum page
Re: Resizer is not working
Posted: Wed Sep 27, 2023 11:32 am
by axew3
Hei!
No, it is the setting of the database connection!
If the button display green mean that the connection to the phpBB db is ok.
localhost normally works into your computer, where you can run a local server.
try
go to wp admin -> Theme file Editor -> header.php
enter editor mode
just after the starting
<?php
tag, add the follow:
Code: Select all
if(isset($_SERVER['HTTP_ORIGIN'])) {
if($_SERVER['HTTP_ORIGIN'] == 'https://forum.knigi-igri.net') {
header("Access-Control-Allow-Origin:".$_SERVER['HTTP_ORIGIN']);
}
}
OR directly try:
Code: Select all
header("Access-Control-Allow-Origin:forum.knigi-igri.net");
save. Try the one and the other solution maybe, what happen?
Re: Resizer is not working
Posted: Wed Sep 27, 2023 2:39 pm
by madnnes
Hey,
Thanks a lot, I'll try this for the forum on my subdomain, for which I have the CORS error.
But I got the localhost error when I'm iframing
knigi-igri/forum page which is not a subdomain, but only a sub-folder.
And still the resizer is not working.
The errors in the web console are:
JQMIGRATE: Migrate is installed, version 3.4.1
(index):573 Uncaught DOMException: Failed to set the 'domain' property on 'Document': 'localhost' is not a suffix of 'knigi-igri.net'.
at
https://knigi-igri.net/board/:573:21
(anonymous) @ (index):573
[Violation] Forced reflow while executing JavaScript took 37ms
(index):359 document.domain mutation is ignored because the surrounding agent cluster is origin-keyed.
That's why I'm wondering from where that localhost is coming as I didn't setup it anywhere.
I'm using Google Chrome as a browser.
Re: Resizer is not working
Posted: Wed Sep 27, 2023 10:09 pm
by ale
look, do this please, because i just tested and installed
an iframe integration into my localhost with:
wp at w3host.com
phpBB at forum.w3host.com
(i wanted it for the devel of the next version of the iframe code)
i tested the shortcode integration working fine, but i had to do this:
open
/wp-content/plugins/wp-w3all-phpbb-integration/views/wp_w3all_phpbb_iframe_short.php
and where this line:
Code: Select all
document.domain = '".$document_domain."'; // NOTE: for domains like 'mysite.co.uk' remove this line, if you setup the next to match the correct document.domain
change into
Code: Select all
document.domain = 'knigi-igri.net'; // NOTE: for domains like 'mysite.co.uk' remove this line, if you setup the next to match the correct document.domain
the same need to be into overall_footer added code where:
Code: Select all
document.domain = 'knigi-igri.net'; // MANDATORY! // Set/Change this value to fit your domain (example: axew3.com (or leave localhost if on localhost))
if you are using the page-forum.php (page-board.php in your case) , then you have to change the above and set manually (open it with a text editor) the same
Code: Select all
document.domain = 'knigi-igri.net';
into your page-board.php, on your active template folder
- forum – w3host.com.png (59.41 KiB) Viewed 4582 times
Re: Resizer is not working
Posted: Thu Sep 28, 2023 7:16 am
by madnnes
Hey Ale,
Thanks for your help on this.
But my site is currently hosted in Siteground and it's not on localhost, so I don't really know from where I have that message about localhost is not a suffix. And I'm not using a shortcode for the iframe, but a direct page integration.
Still I did what you've suggested and It didn't helped.