View Issue Details

IDProjectCategoryView StatusLast Update
16733Bug reportsTheme editorpublic2021-01-28 21:52
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.24.0 
Summary16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error
DescriptionWhen importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error
Instead of getting a "File to Big error", we got a CRSF token error. Very missleading
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.24.0
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Relationships

related to 16834 reviewgabrieljenik When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error 
related to 17026 closedgabrieljenik Custom themes not uploading files 

Activities

DenisChenu

DenisChenu

2020-10-13 11:40

developer   ~60169

We have some checker in Upload Question tye : maybe we can create an helper or an extension ?
gabrieljenik

gabrieljenik

2020-10-13 16:45

manager   ~60174

Sure, that's good idea.
DenisChenu

DenisChenu

2020-10-13 16:57

developer   ~60175

If you found time ;)
gabrieljenik

gabrieljenik

2020-10-16 16:19

manager   ~60233

I think this is failing as well on the Token CSV import
DenisChenu

DenisChenu

2020-10-16 16:47

developer   ~60234

I think it's failling as well onn VVimport :)
gabrieljenik

gabrieljenik

2020-10-23 14:56

manager   ~60390

Fix applied to:

Theme import (Themes list and Theme editor)
File upload in Theme editor (uploading files to a theme)
Image upload (in global theme options)
Image upload (in survey theme options
There are other places where this should be applied. I have some already fixed. Want to review these first.

These are fixed and pendign to be applied:

CPDB (Import CSV)
Labelset import
Token import
Question import (had to add 'action' and 'sid' to the URL)
These are pending to be fixed:

UploaderController
questiongroups
surveyadmin - Import survey - Need to split the method (used for copy and import), or move the 'action' to the URL.
frontend_helper, checkUploadedFileValidity ?
dataentry - Import VV file (need to split the method or assume an upload action when the request is POST)

https://github.com/LimeSurvey/LimeSurvey/pull/1633

See comments on github.
gabrieljenik

gabrieljenik

2020-11-10 10:41

manager   ~60598

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30710
lime_release_bot

lime_release_bot

2020-11-16 09:31

administrator   ~60649

Fixed in Release 3.25.0+201117
gabrieljenik

gabrieljenik

2020-11-16 17:17

manager   ~60670

Reopening for applying the patch on the other uploads, now that the main part has been merged
gabrieljenik

gabrieljenik

2020-11-16 17:21

manager   ~60671

Now applying the patch to:
- CPDB (Import CSV)
- Labelset import
- Token import
- Question import (had to add 'action' and 'sid' to the URL)

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1658

We should port this to LS4 after. Right?
gabrieljenik

gabrieljenik

2020-12-07 10:21

manager   ~60845

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30771
lime_release_bot

lime_release_bot

2020-12-07 11:36

administrator   ~60854

Fixed in Release 3.25.3+201208
c_schmitz

c_schmitz

2021-01-06 14:57

administrator   ~61443

This breaks the file upload on themes. Cannot upload files anymore.
gabrieljenik

gabrieljenik

2021-01-06 15:37

manager   ~61444

I think it was there all time, since long time ago.
Created new ticket: https://bugs.limesurvey.org/view.php?id=16948
c_schmitz

c_schmitz

2021-01-06 15:41

administrator   ~61445

ok, determined the issue existed before. Closing again.

Related Changesets

LimeSurvey: 3.x-LTS eef20220

2020-11-10 10:41:45

gabrieljenik


Committer: GitHub Details Diff
Bug/16733 when importing a theme bigger in size than the allowed php.ini settings, there is no proper description of the error (#1633)

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Adding helper functions for checking uploads filesize

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Applying fix on
- Theme import (Themes list and Theme editor)
- File upload in Theme editor (uploading files to a theme)
- Image upload (in global theme options)
- Image upload (in survey theme options

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Creating Uploadhelper and moving helper functions to class methods.
Affected Issues
16733
mod - application/controllers/admin/surveyadmin.php Diff File
mod - application/controllers/admin/themes.php Diff File
add - application/core/LSUploadHelper.php Diff File
mod - application/views/admin/themeoptions/import_modal.php Diff File
mod - application/views/admin/themeoptions/update.php Diff File
mod - application/views/admin/themes/importform_view.php Diff File
mod - themes/survey/bootswatch/options/options.twig Diff File
mod - themes/survey/fruity/options/options.twig Diff File
mod - themes/survey/vanilla/options/options.twig Diff File

LimeSurvey: 3.x-LTS 5961c2e5

2020-12-07 10:20:58

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16733: When importing a theme bigger in size than the allowed php.ini settings, there is no proper description of the error (#1658)

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Patching on the CPDB (Import CSV)

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Patching on the token upload

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Patching on the question import

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Patching on the labels import
Affected Issues
16733
mod - application/controllers/admin/labels.php Diff File
mod - application/controllers/admin/participantsaction.php Diff File
mod - application/controllers/admin/questions.php Diff File
mod - application/controllers/admin/tokens.php Diff File

Issue History

Date Modified Username Field Change
2020-10-13 01:49 gabrieljenik New Issue
2020-10-13 11:40 DenisChenu Note Added: 60169
2020-10-13 16:45 gabrieljenik Note Added: 60174
2020-10-13 16:57 DenisChenu Note Added: 60175
2020-10-13 17:01 cdorin Assigned To => gabrieljenik
2020-10-13 17:01 cdorin Status new => assigned
2020-10-16 16:19 gabrieljenik Note Added: 60233
2020-10-16 16:47 DenisChenu Note Added: 60234
2020-10-23 14:56 gabrieljenik Note Added: 60390
2020-11-10 10:41 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS eef20220
2020-11-10 10:41 gabrieljenik Note Added: 60598
2020-11-10 10:41 gabrieljenik Resolution open => fixed
2020-11-16 09:31 lime_release_bot Note Added: 60649
2020-11-16 09:31 lime_release_bot Status assigned => closed
2020-11-16 17:17 gabrieljenik Status closed => feedback
2020-11-16 17:17 gabrieljenik Resolution fixed => reopened
2020-11-16 17:17 gabrieljenik Note Added: 60670
2020-11-16 17:21 gabrieljenik Note Added: 60671
2020-11-16 17:23 gabrieljenik Issue cloned: 16834
2020-11-16 17:23 gabrieljenik Relationship added related to 16834
2020-12-07 10:21 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 5961c2e5
2020-12-07 10:21 gabrieljenik Note Added: 60845
2020-12-07 10:21 gabrieljenik Resolution reopened => fixed
2020-12-07 11:36 lime_release_bot Note Added: 60854
2020-12-07 11:36 lime_release_bot Status feedback => closed
2021-01-06 14:57 c_schmitz Status closed => feedback
2021-01-06 14:57 c_schmitz Resolution fixed => reopened
2021-01-06 14:57 c_schmitz Note Added: 61443
2021-01-06 15:37 gabrieljenik Issue cloned: 16948
2021-01-06 15:37 gabrieljenik Note Added: 61444
2021-01-06 15:41 c_schmitz Status feedback => resolved
2021-01-06 15:41 c_schmitz Resolution reopened => fixed
2021-01-06 15:41 c_schmitz Status resolved => closed
2021-01-06 15:41 c_schmitz Note Added: 61445
2021-01-28 21:52 gabrieljenik Issue cloned: 17026
2021-01-28 21:52 gabrieljenik Relationship added related to 17026