Comments (17)
I have added the file upload.ini to the docker-compose.yml. The attempts with the configuration in the folder /app/web/sites/default did not work
from csis-helpers-module.
Include in report button for iFrames is implemented and can be tested e.g. here. However, unfortunately html2canvas creates a blank snapshot of the iframe.
So instead of the iFrame as a whole, we maybe have to select an element within the iFrame as described here.
from csis-helpers-module.
Tried with this study, but got:
error posting report image
It would be helpful to log the concrete error in csis_include_in_report.js#L168
from csis-helpers-module.
True, I was expecting the Drupal logger to log such errors, but he doesn't. I will log the error messages directly in the script.
The image file itself is created, but it fails when creating the Report Image entity, so I'm guessing that's because there is no GL-step available on that page to which the Report Image could be linked.
I need to add it directly to the Study group, but I remember there were some issues with JSON:API altering Group instances. Was couple of months ago, might have been solved by now. I will look into this.
from csis-helpers-module.
I'm guessing that's because there is no GL-step available on that page to which the Report Image could be linked.
Yes, this should be the problem now.
First, the request to create the Report Image Entity answered with a 413 Request Entity too large
, but since this is solved, the request answers with a 404 The resource identified by 'node--gl_step:-1' (given as a relationship item) could not be found
from csis-helpers-module.
Status @therter ?
What's going on in this branch: bug/9_use_table_div?
Answer is here
from csis-helpers-module.
Is there a possibility to increase the resolution of the snapshot? This snapshot image is even smaller than the original map shown on the screen. For printing, this is not suitable.
Please note the URI of the image: /sites/default/files/styles/max_650x650/. So for some reason the size is limited to max. 650x650px when uploading (?) the image. Is this a restriction at Drupal side or at html2canvas side?
from csis-helpers-module.
Is there a possibility to increase the resolution of the snapshot? This snapshot image is even smaller than the original map shown on the screen. For printing, this is not suitable.
Please note the URI of the image: /sites/default/files/styles/max_650x650/. So for some reason the size is limited to max. 650x650px when uploading (?) the image. Is this a restriction at Drupal side or at html2canvas side?
No, this is not a Drupal or html2canvas restriction, that's just how drupal handles images. The original image taken by html2canvas is this one (your previous URI without the "/styles/max_650x650/public").
Drupal allows to define different image styles, which you can then use in either Views or display modes. That will determine how the image will be shown in the FE.
AFAIK we use the default style (so the original image resolution) on all report images. Since you managed to find one in a 650x650 resolution, I guess we have a misconfiguration somewhere.
@p-a-s-c-a-l Where exactly did you find this image being displayed?
from csis-helpers-module.
So for some reason the size is limited to max. 650x650px when uploading (?) the image. Is this a restriction at Drupal side or at html2canvas side?
On html2canvas side, it is possible to increase the resolution of the image with the scale option. But drupal does not accept such images, because they are too large.
In my local instance, I get the following error message:
Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException: Unprocessable Entity: file validation failed. The file is 2.39 MB exceeding the maximum file size of 2 MB. in Drupal\jsonapi\Controller\FileUpload->handleFileUploadForNewResource() (line 177 of /app/web/core/modules/jsonapi/src/Controller/FileUpload.php).
I will try to increase the allowed file size locally to test images with a higher resolution.
from csis-helpers-module.
So for some reason the size is limited to max. 650x650px when uploading (?) the image. Is this a restriction at Drupal side or at html2canvas side?
On html2canvas side, it is possible to increase the resolution of the image with the scale option. But drupal does not accept such images, because they are too large.
Oh interesting, I didn't know that. But where is this currently applied? I just took a screenshot of the Study Area for Study 30 and one screenshot of the hazard map. In both cases (image 1, image 2) html2canvas created the images with the same resolution as shown on the website.
from csis-helpers-module.
But where is this currently applied?
Since the drupal system currently does not accept large images, this isn't applied, yet.
from csis-helpers-module.
Where exactly did you find this image being displayed?
Right after clicking the include in report button and on preview. So the 650x650 resolution is probably o.k,. for preview mode and we don't have to change it as long as the full resolution is available in the (PDF) report.
from csis-helpers-module.
But where is this currently applied?
Since the drupal system currently does not accept large images, this isn't applied, yet.
Oh my mistake, I though you said that html2canvas is currently limiting the resolution to 650x650.
from csis-helpers-module.
Where exactly did you find this image being displayed?
Right after clicking the include in report button and on preview. So the 650x650 resolution is probably o.k,. for preview mode and we don't have to change it as long as the full resolution is available in the (PDF) report.
Ah right. Denis just recently included the image in the edit form of the report image and set the formatter style to 650x650. However, that does not impact how the image is later shown in the PDF, so we don't need to fix that.
from csis-helpers-module.
To allow the upload of bigger images, the file /usr/local/etc/php/conf.d/uploads.ini has to be created. The content of the file should be something like this:
file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
from csis-helpers-module.
To allow the upload of bigger images, the file /usr/local/etc/php/conf.d/uploads.ini has to be created.
@therter What's the status? How is this solved within our drupal docker container?
from csis-helpers-module.
Implemented. But there is still a bug.
from csis-helpers-module.
Related Issues (20)
- Include additional info in $entityinfo HOT 20
- Explain what the module does HOT 1
- Emikat Trigger specifications HOT 4
- Support for additional processing variables HOT 10
- A wrong parameter name is used HOT 2
- Hide edit buttons if user permissions are not sufficient HOT 1
- Calculation in progress/finished indication HOT 7
- Creating automated tests for Integration with Emikat HOT 1
- Transport Module (TM) trigger specifications HOT 5
- Cannot read property 'step' of undefined HOT 1
- Include in Report button: use jpeg instead of png images
- Support for extended iFrame query parameters HOT 1
- Add boolean field for Adaptation Project into $StudyInfo HOT 2
- Documentation HOT 1
- Get Node UUID HOT 2
- 404 Error message for Report image GET request via JSON:API HOT 1
- Theme Missing HOT 1
- Opening Edit-form as modal not working for links created by the module HOT 2
- Include In Report Button not working properly HOT 54
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csis-helpers-module.