I have a classic asp application that uses an include file. The include file is a footer at the end of the page and works fine until the page is large and then the include file stop displaying.
Has anyone come across this?
If you end the response prior to the include directive, then the included file will not be displayed.
This could be caused by either (a) a Response.End or (b) an exception. Sometimes the exception won't be visible because it is within a non-visible element. View the page source to look for these and scroll to the end.
Check the 'long file' and see if either of these occurs.
Another possibility with very large files is that the file hasn't finished rendering the page. Make sure that the whole page has rendered.
Related
I am trying to include a t-call inside the homepage template in Odoo (between two sections). It works fine but when I open the editor the drageable areas around the other sections are not displaying. Is there a way to ignore the t-call part when the editor loads or is there a way around this?
I have tried using dynamic templates but I would like to avoid the loading time when the page loads and render the page on the server.
I have also tried adding various classes or attributes on the tags surrounding the call but nothing seems to work.
Thanks,
My Asp.Net Core 2.1 app can generate two HTML reports. Each report has a button for outputting the report as a PDF file using DinkToPDF. The button calls a controller for that report that provides all the parameters that DinkToPDF needs and then generates the PDF. An essential parameter is the URL of the page to be converted, which is not the original HTML report but a lookalike from which javascript etc. has been removed.
The first report would output the login page instead of the report data until I put [AllowAnonymous] above the class name. Then it worked fine.
The second report used the files from the first report as a template. In all necessary places everything was renamed appropriately. But even though this page of course has [AllowAnonymous], it will only generate a PDF of the login page.
I can step through the controller code and watch the DinkToPDF params get their values. But when "convert" method of DinkToPDF is called, something goes wrong.
Is there a way to watch inside that method to see why it thinks it must authenticate?
After I thought to look in the Output window, I saw that this was one of those "Qt: Could not initialize OLE" errors. I also found that the database context object being injected into my class was null. Evidently the context was being lost somehow. In the original report, that didn't matter because I had sidestepped EF Core and was accessing the database by old-style ADO-type calls.
Therefore, in the new report, I replaced all EF Core with ADO-type calls, and the problem went away. Just had to work out some routing.
I am using the FileUpload in advanced mode. I used it before on another page in the same application where it works.
But now I am trying to use it again on another page and I can't get it working.
The 3 buttons (choose, upload and cancel) appear. When I choose a file the buttons "upload" and "cancel" are enabled but the choosen file isn't shown under the buttons.
When pressing the upload button, I get the following message (and my handler is never called):
Uncaught TypeError: Cannot read property 'submit' of undefined
Source: fileupload.js.xhtml?ln=primefaces&v=5.2:1
I have been looking with the debugger in the javascript. The error occurs in the following block of code:
upload: function() {
for (var a = 0; a < this.files.length; a++) {
this.files[a].row.data("filedata").submit()
}
},
I think this error is caused because after choosing a file, it is added to the array named files but data("filedata") should also exist and doesn't exist for the file. So the script tries to call the submit method of something undefined. I guess the undefined thing is an input which should be added to the html after choosing a file and which isn't added.
Does any one have an idea what might be causing this problem?
I have no idea whether it's relevant, but the page where the FileUpload works is for uploading images and allowTypes is specified there, while on this page I am uploading text files and the attribute allowTypes isn't specified. So I tried to choose an image file (gif or png) but that isn't shown either and in that case the buttons Upload and Cancel remain disabled.
When specifying allowTypes and selecting a bad file the error message is shown under the buttons, but when a matching file is selected it's still the same. It doesn't work.
I also posted this question on the Prime Community Forum: http://forum.primefaces.org/viewtopic.php?f=16&t=46724&p=145363&sid=54403839b9ad4535b70087b19048cf04#p145363
I have got it working now. The FileUpload was embedded in 2 panelGrids. After removing both panelGrids the FileUpload works.
It seems that a panelGrid can mess up the HTML element tree structure in such way that the FileUpload doesn't find it's own files list table any more (It uses JQuery to find it).
So, I can go on with my work.
But I still don't know what exactly happened, and I would like to know.
I am trying for hours to solve the following caching problem.
My application has the following structure (simplified):
index.php - main page (contains various input fields, submit button and an iframe for dispaying PDF content with the help of TCPDF)
generate.php - generates PDF file based on the supplied POST parameters and stores the file to the filesystem
viewer.php - Displays the PDF document (TCPDF libraries). The iframe loads this script to show the pdf file
The workflow is pretty simple - the user chooses some options and clicks the submit button on the main page. The selected parameters are sent per AJAX by POST to the generate.php script. The script generates the PDF file and stores it to the filesystem. At the end it returns the newly created/edited filename. The filename is fetched in the AJAX callback function, which then refreshes the iframe with the new/edited filename:
viewer.php?filename=NEW_OR_EDITED_FILENAME
Everything is working, but when the file is being replaced, sometimes (NOT ALWAYS), the browser shows the old pdf file, although the new version is on the hard drive. I tried the following solutions:
Add Meta tags to disable cache to the generated HTML by index.php and viewer.php
Disabling cache for jQuery AJAX calls by: jQuery.ajaxSetup({cache: false});
Adding some random string to the the filename parameter:
viewer.php?filename=FILENAME_RANDOMSTRING
The RANDOMSTRING is then removed from the script and the filename is extracted.
None of these solutions worked for me. Tested browsers are: Chrome 25.0.1364.152 and Firefox 19.0. Can someone help me with this?
Thanks in advance
Just had the same problem but after adding a random string it works perfect:
<iframe src="file.pdf?=<?=time();?>"></iframe>
After many hours of trying, the solution I found is to really generate a new file each time (Solution 3 from the question without removing the random string at the end of the file). As a result it was necessary to update the database and to delete the old files on every change. My initial intention was to avoid these actions, but unfortunately no other solution was found
i have done 'everything' that manual says.
included all files, adding it properly to html structure, loaded images,..
please, you can view live problem here
You are using ajaxpage to load the div with id=slider for certain categories for page.php. However, Nivo slider is looking for a div after the primary page has loaded (the $(window).load function).
Somehow, you need to attach the .load function call to the page being loaded by ajaxpage.
You might try adding the $(window).load call to the bottom of each page whenever you are setting up a Nivo slideshow.
If you were using jQuery's ajax library/module calls, you might be able to attach the load action to fire when the ajax has loaded.
I looked at the source of one of your page.php pages with Nivo and I think that you set up the HTML correctly, but the Nivo module just has not been started, partly because of the way the page is pulling in the content using ajax.
This is a clever way of doing things, but just needs a different trick to starting Nivo.