Modal view not working in Firefox v82 or v83
Modal view not working in Firefox v82 or v83
Hi all
I am having an issue with the PDF / Custom buttons in the new version of Firefox (bkerr is having the same issue in Chrome on this forum post viewtopic.php?f=11&t=3984).
I have created several custom buttons that open a Word document (invoices, Purchase Orders, etc) from a table, using the SelectedID of the record that is being viewed. I also have records that show an icon for a PDF document.
In Firefox v81, when I open a PDF / click on my custom button from the modal view, it works perfectly. The PDF opens in a new tab, the custom button opens my Word doc.
In Firefox v82 / v83, when I open a PDF / click on my custom button from a modal view, it opens a new blank tab. Nothing else.
I have to open the record in the Detail View for both the PDF or the custom buttons to work (so I have to go to the relevant table, then open the relevant record to be able to view the PDF / open the Custom Word doc).
I think this is something to do with the new Firefox not recognising the selectedID of the modal view, but nothing appears in my browser console.
Can anyone help?
I am having an issue with the PDF / Custom buttons in the new version of Firefox (bkerr is having the same issue in Chrome on this forum post viewtopic.php?f=11&t=3984).
I have created several custom buttons that open a Word document (invoices, Purchase Orders, etc) from a table, using the SelectedID of the record that is being viewed. I also have records that show an icon for a PDF document.
In Firefox v81, when I open a PDF / click on my custom button from the modal view, it works perfectly. The PDF opens in a new tab, the custom button opens my Word doc.
In Firefox v82 / v83, when I open a PDF / click on my custom button from a modal view, it opens a new blank tab. Nothing else.
I have to open the record in the Detail View for both the PDF or the custom buttons to work (so I have to go to the relevant table, then open the relevant record to be able to view the PDF / open the Custom Word doc).
I think this is something to do with the new Firefox not recognising the selectedID of the modal view, but nothing appears in my browser console.
Can anyone help?
Re: Modal view not working in Firefox v82 or v83
Please can anyone help with this? It is very very annoying! I cannot use Appgini modal views at the moment, as this issue is affecting every modal and there is nothing shown in the Firefox console to help me narrow it down.
I have attached screenshots to explain more clearly. The first screenshot is the Detail view of the parent record, showing the child tabs. If I click on the download icon of the child record (highlighted), the attachment opens fine.
The second shot is the modal view of the same child record. If I click on the download icon (highlighted) it opens a blank tab. This is happening across all my Appgini modal views - I can open the attachment from the main record but not in modal, whether it is PDF, Word, or JPG.
I have attached screenshots to explain more clearly. The first screenshot is the Detail view of the parent record, showing the child tabs. If I click on the download icon of the child record (highlighted), the attachment opens fine.
The second shot is the modal view of the same child record. If I click on the download icon (highlighted) it opens a blank tab. This is happening across all my Appgini modal views - I can open the attachment from the main record but not in modal, whether it is PDF, Word, or JPG.
Re: Modal view not working in Firefox v82 or v83
Hi Christina,
I do not have a solution but I have just tested a similar scenario and must confirm this issue.
You should send a detailed bugreport to BigProf, I think.
Not working in ...
I do not have a solution but I have just tested a similar scenario and must confirm this issue.
You should send a detailed bugreport to BigProf, I think.
Not working in ...
- Google Chrome
Version 87.0.4280.66
64-Bit
Blank page with url http://localhost/xxxxxxxx/link.php?t=at ... file&i=110 - Opera
Version:72.0.3815.320
and also latest Version:72.0.3815.400
Blank page with url http://localhost/xxxxxxxx/images/ed216e1dee4feb34a.pdf - Edge
Version 87.0.664.47
(64-Bit)
Blank page with url http://localhost/xxxxxxxx/images/ed216e1dee4feb34a.pdf
- Firefox
82.0.3
64-Bit - 83.0
64-Bit
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Modal view not working in Firefox v82 or v83
Thank you Jan!
I will send a bug report now via email, I am glad that someone else is experiencing the same issue (not glad, but at least I am not going crazy!)
Have a wonderful week
I will send a bug report now via email, I am glad that someone else is experiencing the same issue (not glad, but at least I am not going crazy!)
Have a wonderful week
Re: Modal view not working in Firefox v82 or v83
Thanks, same to you!
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Modal view not working in Firefox v82 or v83
Hmm ... Modal window displays content in an iframe. Iframes have a sandbox attribute that determines the permissions of the iframe. AppGini apps set the sandbox attribute by default to allow-modals allow-forms allow-scripts allow-same-origin allow-popups but I guess this issue might be fixed by adding the permission allow-popups-to-escape-sandbox to the sandbox attribute. I'll inspect this and see if it works.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Modal view not working in Firefox v82 or v83
Hi Ahmad
I have tried sending a bug report to the support email - however I have had a postmaster bounceback saying the message has failed due to a DNS error.
Shall I resend?
I have tried sending a bug report to the support email - however I have had a postmaster bounceback saying the message has failed due to a DNS error.
Shall I resend?
Re: Modal view not working in Firefox v82 or v83
I have the same problem with Microsoft Edge. I can just view the file if I use the riht click - open in another tab
thanks
thanks
Re: Modal view not working in Firefox v82 or v83
For a temporary fix (will need to be re-applied if you regenerate your app) till the next release, please open the generated 'common.js.php' file in a text editor, and find this code:
To:
You should find 2 occurances of this code. Please change both.
Code: Select all
sandbox="allow-modals allow-forms allow-scripts allow-same-origin allow-popups"
Code: Select all
sandbox="allow-modals allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Modal view not working in Firefox v82 or v83
Yay it worked!
Thank yo so much Ahmad, we can now work using our app again (and update our FIrefox!)
Have a wonderful holiday season and stay safe.
Thank yo so much Ahmad, we can now work using our app again (and update our FIrefox!)
Have a wonderful holiday season and stay safe.
Re: Modal view not working in Firefox v82 or v83
Thanks and same to you 
I'll include this fix in the next release.

I'll include this fix in the next release.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Modal view not working in Firefox v82 or v83
Hi
Thank you for doing this - it works on the PDF downloads, but it doesn't work on the custom invoice buttons I created using the Udemy course
I can work around it by going directly to the DV of the child record and using my custom buttons, but it was easier when I could use the modal view from the parent record!
Anyway, thank you for all your hard work on Appgini, it is a wonderful tool.
Thank you for doing this - it works on the PDF downloads, but it doesn't work on the custom invoice buttons I created using the Udemy course

I can work around it by going directly to the DV of the child record and using my custom buttons, but it was easier when I could use the modal view from the parent record!
Anyway, thank you for all your hard work on Appgini, it is a wonderful tool.
Re: Modal view not working in Firefox v82 or v83
Hi all
Sorry, am just bumping this one in case someone can come up with a fix for the buttons in modal view.
So, I can now open PDFs using the download link after applying Ahmad's fix.
But I cannot use my invoice buttons created - I was wrong in my earlier posts, they are actually created using Appgini Helper (code as below).
Is there a fix I can apply to the code so that it can use the modal view?
Sorry, am just bumping this one in case someone can come up with a fix for the buttons in modal view.
So, I can now open PDFs using the download link after applying Ahmad's fix.
But I cannot use my invoice buttons created - I was wrong in my earlier posts, they are actually created using Appgini Helper (code as below).
Is there a fix I can apply to the code so that it can use the modal view?
Code: Select all
//var dv = new AppGiniDetailView();
var actionbuttons = dv.actionbuttons;
var group = actionbuttons.addGroup("Accounts");
group.addButton("Create PO", function () {
var selectedID = $j('input[name=SelectedID]').val();
var supplierid = $j('#supplier').val();
var jobid = $j('#jobid').val();
var url_open = 'POrder.php?jobid=';
window.open(url_open + jobid + '&supplierid=' + supplierid + '&jobitemid=' + selectedID + '&clear_session=1');
});
Re: Modal view not working in Firefox v82 or v83
Is dv declared somewhere else, perhaps in header-extras.php
What exactly is the problem: are the buttons missing or is the called function not working?
Any errors in console?
What exactly is the problem: are the buttons missing or is the called function not working?
Any errors in console?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Modal view not working in Firefox v82 or v83
Concat the url into a separate variable and validate the value.
Instead of window.open function you can try window.location.href property which I am using for redirecting. From my experience the href property is compatible with different browsers.
Instead of window.open function you can try window.location.href property which I am using for redirecting. From my experience the href property is compatible with different browsers.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityRe: Modal view not working in Firefox v82 or v83
Hi,
just want to add: I have a customer who had problems with JS in current browsers (Edge, Chrome, Vivaldi, Firefox (84.x)) - but not in IE6. There seem to be some changes in the security area which might cause these "problems" with "our" "old" JS.
In that case it was not an AppGini application, but a simple form, which was not submitted anymore by JS. Why? Don't know, but adding a simple made everything working as before
(I want to add again: No AG application and not my original code
)
Olaf
just want to add: I have a customer who had problems with JS in current browsers (Edge, Chrome, Vivaldi, Firefox (84.x)) - but not in IE6. There seem to be some changes in the security area which might cause these "problems" with "our" "old" JS.
In that case it was not an AppGini application, but a simple form, which was not submitted anymore by JS. Why? Don't know, but adding a simple
Code: Select all
document.uploadForm.submit();

(I want to add again: No AG application and not my original code

Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
Re: Modal view not working in Firefox v82 or v83
Hi all sorry to post and run, life got busy for a while there!
I found a fix - it was very similar to Ahmad's fix, I found it when researching the changes in v82 of Firefox. Thank you Olaf and Jan for your assistance - it was the called function that was not working (the button was fine), it was all due to the new sandbox restrictions "feature" in v82, which was preventing my created Word invoice from being downloaded from Modal view.
To allow my word documents to open from the button in the modal view, I just had to add allow-downloads to the sandbox code. So, in common.js, I edited the sandbox line (2 occurences) to:
Sorry if this was very obvious to everyone else, I am a part-time coder and sometimes it takes me a long time to learn things! Thank you all for your help.
I found a fix - it was very similar to Ahmad's fix, I found it when researching the changes in v82 of Firefox. Thank you Olaf and Jan for your assistance - it was the called function that was not working (the button was fine), it was all due to the new sandbox restrictions "feature" in v82, which was preventing my created Word invoice from being downloaded from Modal view.
To allow my word documents to open from the button in the modal view, I just had to add allow-downloads to the sandbox code. So, in common.js, I edited the sandbox line (2 occurences) to:
Code: Select all
sandbox="allow-modals allow-forms allow-scripts allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox" '