View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 12865 | Bug reports | Other | public | 2017-11-02 18:17 | 2017-12-04 12:00 |
| Reporter | DenisChenu | Assigned To | ollehar | ||
| Priority | none | Severity | minor | ||
| Status | assigned | Resolution | open | ||
| Summary | 12865: Unable to use createFieldMap in console | ||||
| Description | createFieldMap function is used for … a lot of thing, but we are unable to use it in console because this function use Yii::app()->session | ||||
| Steps To Reproduce | Create a plugin or a console controller and add createFieldMap function call | ||||
| Tags | No tags attached. | ||||
| Bug heat | 6 | ||||
| Complete LimeSurvey version number (& build) | |||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | |||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | |||||
| Git branch / Pull Request URL | |||||
|
See https://framagit.org/snippets/860 for a quick plugin example. Currently i redo a helpers/common but then : need to copy/paste a lot lot lot of function … |
|
|
We are using these lines for faking a session: // Faking a session here. |
|
|
Great, i give it a trye :). Still : i think we must remove session usage in createFieldMap : use Cache (some specific cache) |
|
|
Was just about to say what Mazi said: Just hack into $_SESSION. |
|
|
I do that in the unit tests, too. |
|
|
Because : i think we really need a fieldMap without any session/user related system. It's a Development mantis, not a bug |
|
|
If we talk about the very useful fieldmap: How about adding a function to LS API for easily getting the fieldmap for a given survey ID? |
|
|
Can I close this? This is a feature request IMO, not a bug. |
|
|
@olle : it's not in bug , nether in feature request … it's Project/Development . Development is more (for me) : make it better for reusage/understand/adapt … but this don't fix bug or add new feature … |
|
|
I see. I thought "Development" was for LS 3 only, sorry. |
|
|
Oh non, really more old :) |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-11-02 18:17 | DenisChenu | New Issue | |
| 2017-11-02 18:19 | DenisChenu | Note Added: 44936 | |
| 2017-11-03 09:08 | Mazi | Note Added: 44937 | |
| 2017-11-03 09:41 | DenisChenu | Note Added: 44938 | |
| 2017-12-01 13:58 | ollehar | Note Added: 45218 | |
| 2017-12-01 13:59 | ollehar | Note Added: 45219 | |
| 2017-12-01 14:02 | DenisChenu | Note Added: 45220 | |
| 2017-12-01 14:17 | Mazi | Note Added: 45223 | |
| 2017-12-04 11:04 | ollehar | Note Added: 45230 | |
| 2017-12-04 11:04 | ollehar | Assigned To | => ollehar |
| 2017-12-04 11:04 | ollehar | Status | new => feedback |
| 2017-12-04 11:11 | DenisChenu | Note Added: 45231 | |
| 2017-12-04 11:11 | DenisChenu | Status | feedback => assigned |
| 2017-12-04 11:56 | ollehar | Note Added: 45240 | |
| 2017-12-04 12:00 | DenisChenu | Note Added: 45241 |