Resizer is not working

User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Resizer is not working

Post 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!
madnnes
User ww
User ww
Posts: 20
Joined: Tue Sep 26, 2023 8:39 am

Re: Resizer is not working

Post by madnnes »

Hmm, In that case, what host should I specify then if it's not a localhost?

Image

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
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Resizer is not working

Post 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?
madnnes
User ww
User ww
Posts: 20
Joined: Tue Sep 26, 2023 8:39 am

Re: Resizer is not working

Post 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.
User avatar
ale
User w
User w
Posts: 16
Joined: Sun Jul 22, 2018 9:43 pm

Re: Resizer is not working

Post 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
forum – w3host.com.png (59.41 KiB) Viewed 4584 times
madnnes
User ww
User ww
Posts: 20
Joined: Tue Sep 26, 2023 8:39 am

Re: Resizer is not working

Post 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. :(
Post Reply