-
Notifications
You must be signed in to change notification settings - Fork 23
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
Widget not showing #18
Comments
Hi @alexsmith2709, would you be able to provide the full embed script here? Also, some screenshots of the errors gotten from the console would be wonderful 😁. |
Hi @alvinjohnsonso Attached are 2 screenshots showing what you need. It seems like the full code isnt being added to the page if i am understanding the code correctly. My unique ID is missing. I have logged in on the Tawk.to widget options in the magento admin panel and saved the settings, but when i navigate away from that page and then go back to it, while i am still logged in, the property is no longer showing and i need to select it again. I am guessing this is where the problem is coming from. |
Hi again @alexsmith2709, I was trying to recreate the issue but sadly I wasn't able to. I did think of one thing. You said when you installed it manually by adding the javascript code block, it still didn't work right? Did it have the same error like the one you sent ? Would it be alright for you to provide the code block you were inserting? |
Hi @alvinjohnsonso I honestly cannot remember if the error was the same, i saw that i was using the "alternative" way so thought maybe the "proper" way would fix any issue. Are you testing on magento 2.4.1 or another version? |
Yup. I was testing on both Magento 2.4.1 and 2.4.2. But from the looks of the code block that you're inserting before, I think there's an issue with your property since the src URL being passed is tawk.to offers 24×7-365 live support, visit https://www.tawk.to and initiate a chat or send an email at support@tawk.to. |
Hi @alexsmith2709, just wanted to ask if you were able to resolve this? 😁 |
Hi @alvinjohnsonso, Alex |
Hi @alexsmith2709, just wanted to confirm if the error you got was from a fresh install of the plugin? I'm trying to figure out that maybe it is a plugin issue. Also if you can, can you confirm if the |
Hi @alvinjohnsonso, Sorry i havent actually contacted support yet, but thanks for still trying to help. |
Can you post what's in the response tab? 😁 |
For that resource, nothing, it says failed to load. On the page resource i found this:
|
Hi @alexsmith2709, sorry for the late reply, I think I've figured out the issue. I was able to recreate the issue. I think you weren't able to click the |
To make sure it reflects immediately, go to |
Hi @alvinjohnsonso, i have always been able to click on the "Use Selected Widget", that doesnt appear to be the issue. The issue is, that button doesnt actually save that setting, navigating away from that admin page and back again and the widget hasnt been saved and nor is it visible on the site. |
I have just come across this problem as well. I tried an old version (1.3.1) that i have working on another shop and the current version 1.5.1 It appears that it isnt saving the required data when you set it up in the magento admin area. I overwrote the file in view/frontend/templates/embed.phtml and hard coded the s1.src='' section with the code given to me from the website i.e. s1.src='https://embed.tawk.to/cs7dscsdcdsc/123456'; Now it works correctly |
@JackWormUK Thanks for the suggestion. I was hoping we didnt have to revert to that option, but i have now done the same as well as needing to add |
Hi @alexsmith2709 @JackWormUK, I'm taking a look at this issue again and would like to get additional information from you guys. I still can't replicate the issue on my end (might be because I'm doing the testing locally). Could I possibly verify this with you guys? When loading the widget selection iframe, the URL in the iframe has the |
Hi @alvinjohnsonso, it is set to my domain, but it is the http, not https so i dont know if this is causing it? |
@alvinjohnsonso I can confirm that mine is the same as alexsmiths. It is set as per your screen shot, except to my domain and its http not https Edit. I also looked at the widget response code. i can see you have a message container;
However these do not fire when the widget is setup and you click "Use Selected Widget" |
@alexsmith2709 @JackWormUK thanks for responding to my request! Tested it out and that seems to be the issue if your current URL is using The thing is that the plugin should be able to determine if the request is using an |
@alvinjohnsonso I'm afraid that is above my level of knowledge. |
@alvinjohnsonso I have had a look at this. To begin with I overwrote your code so that $protocol was always set to https. This seemed to get everything working. I then went further into the code. Its seems the ZEND object array for getServer() is working on the varnish side which is obviously http and not https
This actually returns NULL. for this line
Wouldn't $httpServer always be set as it is a variable where you always make a call to a function? Anyway, I have modified your function to this;
This uses the HTTP_X_FORWARD_PROTO variable saved in the getServer() object array to do a secondary check for the https protocol. This should work correctly for those who are offloading to VARNISH This code now returns the correct HTTP/HTTPS configuration (for me anyway). EDIT It seems older versions also used 'SSL_OFFLOADED' (would return http or https) headers, so you might want to check for that as well, although HTTP_UPGRADE_INSECURE_REQUESTS (returns 0 or 1) header might be more universal to all versions. |
@alvinjohnsonso For your reference, here is dump of the
|
Hi @JackWormUK, thanks for taking a look at this! I took a look at the From what I understood, it first looks up if the Would it be alright to ask you to try the function on your end? I wasn't able to replicate the server setup that you have. Or rather, I don't know how to 😅. Here's the function I used on my end.
|
That's a much neater solution! Tested on my server and its working correctly :) |
Hi @JackWormUK @alexsmith2709, there's a new release for the updated protocol checking. https://github.com/tawk/tawk-magento-2/releases/tag/v1.5.2 |
Thanks for letting us both know! |
I have just installed the chat widget on Magento 2.4.1 but it is not showing. I have installed it using the composer method and i have logged in to Tawk from the magento admin and the widget is setup.
I previously used it on magento 2.3.3 no problem. I had it installed the manual way by adding the javascript to a widget/block. When i first upgrade magento i kept the install this way, but it didnt show which i is why i thought i would change the way i installed it to see if that fixes the problem but it hasnt.
My browser (Brave, but not visible in Firefox either) console says:
(index):711 GET https://embed.tawk.to// net::ERR_ABORTED 400
Above is code lines 710-712 and it references line 711 as the issue.
The text was updated successfully, but these errors were encountered: