View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
18961 | Bug reports | _ Unknown | public | 2023-07-18 00:35 | 2023-12-11 13:03 |
Reporter | juliodiz | Assigned To | DenisChenu | ||
Priority | high | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.1.x | ||||
Summary | 18961: {SURVEYURL} didn't work with plugin using cli event | ||||
Description | {SURVEYURL} don't show complete URL /index.php/215424?token=test1&lang=en-US | ||||
Steps To Reproduce | Steps to reproduceUse {SURVEYURL} Expected resulthttps://survey.com/index.php/215424?token=test1&lang=en-US Actual result/index.php/215424?token=test1&lang=en-US | ||||
Tags | No tags attached. | ||||
Bug heat | 52 | ||||
Complete LimeSurvey version number (& build) | 6.1 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MariaDB | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.4.29 | ||||
has duplicate | 19182 | closed | gabrieljenik | ConsoleApplication can't use Survey->getSurveyUrl() |
related to | 18960 | closed | ollehar | Don't create URL using @@SURVEYURL@@ |
Email Placeholders |
|||||||||||||||||
Application Models Survey |
|||||||||||||||||
Can you tell us which file and line you're suggesting a change? |
|||||||||||||||||
Oh, the Survey model. Will check. |
|||||||||||||||||
Hello juliodiz, |
|||||||||||||||||
Thanks! |
|||||||||||||||||
[2023-07-21T22:44:11-03:00] [INFO] Start sendMailByCron for 455337 Problem when using /usr/bin/php /var/www/public/application/commands/console.php plugin cron --interval=1 |
|||||||||||||||||
Its not working using the php script console to run and send the email. |
|||||||||||||||||
Need to change |
|||||||||||||||||
We are facing the same "CException: ConsoleApplication and its behaviors do not have a method or closure named "createPublicUrl"" problem. Our inviter and reminder cronjob scripts (https://survey-consulting.com/product-category/limesurvey-plugins/limesurvey-cronjob-scripts) are showing an error when being run on console. |
|||||||||||||||||
please also fix the 5.x branch |
|||||||||||||||||
What is the timeframe for fixing this issue ? |
|||||||||||||||||
I'd also like to second that this issue breaks many of our plugins, so a fast fix would be much appreciated. When applying similar changes in the future, please keep such console things in mind. This was broken several times in the past. |
|||||||||||||||||
The bug exist in version 5.6.34, but not in 5.6.16! |
|||||||||||||||||
Was related to new feature «Survey alias» |
|||||||||||||||||
@ollehar : if you don't have time : i need it before try fixing sendMailCron, |
|||||||||||||||||
I was just asking this morning about this ticket. Thanks |
|||||||||||||||||
If you think you can fix before end of week : feel free to take it. |
|||||||||||||||||
@gabrieljenik : remind the publicurl config settings :) |
|||||||||||||||||
Sure... Let me work a bit on it and push something... |
|||||||||||||||||
v5: https://github.com/LimeSurvey/LimeSurvey/pull/3454 Please consider the following when reviewing:
As this is only required when running ConsoleApplication, maybe there is the need of having specific config for console? |
|||||||||||||||||
This is a new feature and must be reported separatly. |
|||||||||||||||||
@juliodiz : i check on last git version : seems OK (via web) Except it don't use publicurl of config. |
|||||||||||||||||
@gabrieljenick :
You can set whole baseUrl in publicurl : |
|||||||||||||||||
re: https://github.com/LimeSurvey/LimeSurvey/pull/3454#pullrequestreview-1632679815
I am no that sure. |
|||||||||||||||||
@mazi @francois-charles.hebert @juliodiz |
|||||||||||||||||
@bismark, please have a look and check to what extend this affects our Inviter and Reminder cronjobs. |
|||||||||||||||||
Look at the issue Summary 18961: {SURVEYURL} not complete URL {SURVEYURL} don't show complete URL /index.php/215424?token=test1&lang=en-US Use {SURVEYURL} https://survey.com/index.php/215424?token=test1&lang=en-US /index.php/215424?token=test1&lang=en-US Where did you see console application here ? |
|||||||||||||||||
Yes, but why fix it in 5.X then ? But only for 6.X |
|||||||||||||||||
It is blocking. If fixes are similar, we cna port one to the other. |
|||||||||||||||||
Oh right : the issue wityh console happen too Just when call @juliodiz : can you confirem something : you report the issue only for console or there are another issue ? |
|||||||||||||||||
{SURVEYURL} i use at email and remember email. When i use sendmailbycron URL was missing. (sendmailcron) |
|||||||||||||||||
You deactivate error to have the mail sent ? Why you din't report at https://gitlab.com/SondagesPro/mailing/sendMailCron/-/issues ? |
|||||||||||||||||
Checked with no update on sendMail Cron
With https://github.com/LimeSurvey/LimeSurvey/commit/55d9eda4c9407db6982dfad0ae8355dfc3c0d572 (parent of https://github.com/LimeSurvey/LimeSurvey/commit/3c7045423a5918987840f2723d7ca2e7f4097823 ) :
|
|||||||||||||||||
@gabrieljenik it looks like there is more work to be done here. Any update on this? |
|||||||||||||||||
@Mazi and @bismark : did you test with your own plugin ? sendMailCron didn't work, but create a fix is easy. |
|||||||||||||||||
What;s pending? |
|||||||||||||||||
|
|||||||||||||||||
OK, then don't work : right ? Thanks for testing |
|||||||||||||||||
then the following code works, the |
|||||||||||||||||
We can not force using baseUrl in config.php : a lot of user have access to same DB from different URL (and some just for admin). |
|||||||||||||||||
Hey. [2023-09-27T12:04:58-03:00] [INFO] Start sendMailByCron for 692856 |
|||||||||||||||||
And more the question is to don't force any admin user to set someting in config.php, must work with Plugin config set. Plugin can easily set publicurl before usage (App()->setConfig is public, and maybe we can move it to LimeSurveyAPI) If current PR work with (App()->setConfig('publicurl'),"http.example.org") inside a plughin : let's go ? |
|||||||||||||||||
Update the last version and still the same problem: |
|||||||||||||||||
Still need to change Application Models Survey $url = App()->createAbsoluteUrl('survey/index', $urlParams); |
|||||||||||||||||
@juliodiz this is not released yet. If you want to test, please use the PR in this post: https://bugs.limesurvey.org/view.php?id=18961#c77120 |
|||||||||||||||||
Haven't tested it, but following the automatic tests, I would say it works. |
|||||||||||||||||
You have set publicUrl? Also, have you tried setting the request->hostinfo ? A clarification regarding setting the baseUrl: there are two.
Both are needed. |
|||||||||||||||||
Not currently, wait for feedback from @bismark |
|||||||||||||||||
Hi, 1- I managed to trigger sendMailCron using the CLI while using this https://github.com/LimeSurvey/LimeSurvey/pull/3454 (LS v5.6.37, PHP 8.0.2, sendMailCron version 4.3.2) without any errors. (see first picture for cli results) Si vous ne souhaitez pas participer à ce questionnaire et ne souhaitez plus recevoir aucune invitation, veuillez cliquer sur le lien suivant : Si vous êtes sur liste noire mais que vous voulez participer à ce questionnaire et recevoir les invitations, merci de cliquer sur le lien suivant : 2- I tried this line as mentionned in another comment: php application/commands/console.php plugin --target=Mailer, but did not seems to do anything on my installation. (No exception raised, nothing). Is there any other specific test that needs to be done? |
|||||||||||||||||
Strange, Maybe it was already set? |
|||||||||||||||||
*/
); I ran the following command:
Which, if i understand correctly, trigger the CLI event for plugin. I kept the default email template, which contains the {SURVEYURL}, and the link in the received email is complete:
All i did was checkout on the branch https://github.com/LimeSurvey/LimeSurvey/tree/bug/18961--SURVEYURL-not-complete-URL , create a new survey with participant, configure send mail cron for the survey and then trigger manually the command. |
|||||||||||||||||
On the 5.x branch, if i run the same command, it raises the following error: [2023-11-27T17:47:26+00:00] [TRACE] Send : francois-charles.hebert@dialogs.ca (1) for 837923 |
|||||||||||||||||
Does that make sense @DenisChenu? |
|||||||||||||||||
Seems great ! Let's go :) (Still : i need to fix the way sendMailCron plugin do it : i think usage of publicurl is better, i do it after the commit is done) |
|||||||||||||||||
ready for merge ? |
|||||||||||||||||
@DenisChenu Some conflicts need to be resolved first https://github.com/LimeSurvey/LimeSurvey/pull/3454 |
|||||||||||||||||
Ready |
|||||||||||||||||
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35795 |
|||||||||||||||||
We are facing the same "CException: ConsoleApplication and its behaviors do not have a method or closure named "createPublicUrl"" problem. Our inviter and reminder cronjob scripts (https://doodlejumping.com) are showing an error when being run on console. |
|||||||||||||||||
@cartwheeljoint: We have just released updated versions of the "Inviter" and "Reminder" email plugins. If you have purchased them within the last 12 months, you should be able to download the Limesurvey plugins for free. |
|||||||||||||||||
Fixed in Release 5.6.48+231205 |
|||||||||||||||||
I assign it to me for testing too :) |
|||||||||||||||||
Wondering if we should create a new story for this:
Or add it somewhere as comments in a config? Or somewhere in the doc? |
|||||||||||||||||
There are no current console action sending email, then set publicurl (or other way) are the responsibility to plugin dev. But : why not add it to API : it can be interesting |
|||||||||||||||||
We can provide something as to ease that. |
|||||||||||||||||
publicurl is used for all links Else : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/config/console.php
good idea :) |
|||||||||||||||||
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35805 |
|||||||||||||||||
Since other user test it and i test it (and commit is clean !) Merged |
|||||||||||||||||
Fixed in Release 6.3.9+231211 |
|||||||||||||||||
LimeSurvey: 5.x 9d4abed0 2023-11-29 17:26 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18961: {SURVEYURL} didn't work with plugin using cli event (#3454) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 18961 |
|
mod - application/core/LSYii_Application.php | Diff File | ||
mod - application/core/Traits/LSApplicationTrait.php | Diff File | ||
LimeSurvey: master ad076b19 2023-12-05 17:15 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 18961: {SURVEYURL} didn't work with plugin using cli event |
Affected Issues 18961 |
|
mod - application/core/LSYii_Application.php | Diff File | ||
mod - application/core/Traits/LSApplicationTrait.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-07-18 00:35 | juliodiz | New Issue | |
2023-07-18 01:47 | juliodiz | Note Added: 76116 | |
2023-07-18 01:47 | juliodiz | Bug heat | 0 => 2 |
2023-07-18 02:23 | juliodiz | Note Added: 76119 | |
2023-07-18 10:48 | ollehar | Note Added: 76121 | |
2023-07-18 10:48 | ollehar | Bug heat | 2 => 4 |
2023-07-18 10:48 | ollehar | Note Added: 76122 | |
2023-07-18 10:53 | ollehar | Priority | none => high |
2023-07-18 11:01 | ollehar | Note Added: 76123 | |
2023-07-18 11:01 | ollehar | Assigned To | => ollehar |
2023-07-18 11:01 | ollehar | Status | new => feedback |
2023-07-18 15:26 | juliodiz | Note Added: 76137 | |
2023-07-18 15:26 | juliodiz | Status | feedback => assigned |
2023-07-22 03:54 | juliodiz | Note Added: 76235 | |
2023-07-24 15:17 | juliodiz | Note Added: 76243 | |
2023-07-24 17:59 | DenisChenu | Issue Monitored: DenisChenu | |
2023-07-24 17:59 | DenisChenu | Bug heat | 4 => 6 |
2023-07-24 18:00 | juliodiz | Note Added: 76252 | |
2023-08-15 10:04 | guest | Bug heat | 6 => 12 |
2023-08-15 10:21 | Mazi | Note Added: 76589 | |
2023-08-15 10:21 | Mazi | Bug heat | 12 => 20 |
2023-08-16 11:15 | bismark | Note Added: 76612 | |
2023-08-16 11:15 | bismark | Bug heat | 20 => 22 |
2023-08-24 08:32 | DenisChenu | Note Added: 76692 | |
2023-08-24 08:32 | DenisChenu | Bug heat | 22 => 24 |
2023-08-24 09:15 | Mazi | Note Added: 76693 | |
2023-08-24 15:07 | guest | Bug heat | 24 => 30 |
2023-08-24 15:11 | francois-charles.hebert | Issue Monitored: francois-charles.hebert | |
2023-08-24 15:11 | francois-charles.hebert | Bug heat | 30 => 32 |
2023-08-24 15:49 | francois-charles.hebert | Note Added: 76695 | |
2023-08-24 15:49 | francois-charles.hebert | Bug heat | 32 => 34 |
2023-08-24 16:16 | DenisChenu | Note Added: 76698 | |
2023-09-11 19:52 | gabrieljenik | Relationship added | related to 18960 |
2023-09-12 08:30 | DenisChenu | Note Added: 76952 | |
2023-09-12 17:44 | gabrieljenik | Note Added: 76962 | |
2023-09-12 17:44 | gabrieljenik | Bug heat | 34 => 36 |
2023-09-12 17:45 | DenisChenu | Note Added: 76963 | |
2023-09-12 18:50 | gabrieljenik | Assigned To | ollehar => gabrieljenik |
2023-09-13 17:12 | DenisChenu | Note Added: 77014 | |
2023-09-13 17:52 | gabrieljenik | Note Added: 77015 | |
2023-09-18 14:09 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-09-18 14:09 | gabrieljenik | Status | assigned => ready for code review |
2023-09-18 14:09 | gabrieljenik | Note Added: 77120 | |
2023-09-18 14:09 | gabrieljenik | Note Edited: 77120 | |
2023-09-19 09:31 | DenisChenu | Note Added: 77151 | |
2023-09-19 10:07 | DenisChenu | Note Added: 77152 | |
2023-09-19 10:14 | DenisChenu | Note Added: 77153 | |
2023-09-19 10:15 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-09-19 10:15 | DenisChenu | Status | ready for code review => in code review |
2023-09-19 13:34 | gabrieljenik | Note Added: 77163 | |
2023-09-19 13:37 | gabrieljenik | Note Added: 77164 | |
2023-09-19 13:49 | Mazi | Note Added: 77165 | |
2023-09-19 15:23 | DenisChenu | Note Added: 77170 | |
2023-09-19 15:56 | DenisChenu | Note Added: 77171 | |
2023-09-19 16:51 | gabrieljenik | Note Added: 77177 | |
2023-09-19 17:15 | DenisChenu | Note Added: 77181 | |
2023-09-19 17:16 | DenisChenu | Note Edited: 77181 | |
2023-09-20 00:33 | juliodiz | Note Added: 77191 | |
2023-09-20 09:01 | DenisChenu | Summary | {SURVEYURL} not complete URL => {SURVEYURL} didn't work with plugin using cli event |
2023-09-20 09:02 | DenisChenu | Note Added: 77194 | |
2023-09-20 09:19 | DenisChenu | Status | in code review => ready for testing |
2023-09-20 09:26 | DenisChenu | Note Added: 77195 | |
2023-09-20 09:27 | DenisChenu | Note Edited: 77195 | |
2023-09-20 09:39 | DenisChenu | Note Edited: 77195 | |
2023-09-20 14:39 | gabrieljenik | Assigned To | gabrieljenik => tibor.pacalat |
2023-09-22 17:57 | tibor.pacalat | Status | ready for testing => feedback |
2023-09-22 17:57 | tibor.pacalat | Assigned To | tibor.pacalat => gabrieljenik |
2023-09-22 17:58 | tibor.pacalat | Note Added: 77287 | |
2023-09-22 17:58 | tibor.pacalat | Bug heat | 36 => 38 |
2023-09-22 19:04 | DenisChenu | Note Added: 77289 | |
2023-09-25 15:30 | gabrieljenik | Note Added: 77313 | |
2023-09-26 08:34 | DenisChenu | Note Added: 77321 | |
2023-09-26 16:50 | bismark | Note Added: 77338 | |
2023-09-26 16:50 | bismark | File Added: grafik.png | |
2023-09-26 17:02 | DenisChenu | Note Added: 77339 | |
2023-09-26 19:02 | bismark | Note Added: 77351 | |
2023-09-27 08:32 | DenisChenu | Note Added: 77352 | |
2023-09-27 17:09 | juliodiz | Note Added: 77386 | |
2023-09-27 17:09 | juliodiz | Status | feedback => assigned |
2023-10-02 17:04 | DenisChenu | Note Added: 77468 | |
2023-10-02 17:05 | DenisChenu | Note Edited: 77468 | |
2023-10-02 20:36 | juliodiz | Note Added: 77478 | |
2023-10-04 04:58 | juliodiz | Note Added: 77490 | |
2023-10-04 19:43 | gabrieljenik | Note Added: 77508 | |
2023-10-04 19:44 | gabrieljenik | Note Added: 77509 | |
2023-10-05 15:40 | gabrieljenik | Note Added: 77521 | |
2023-10-09 19:04 | gabrieljenik | Status | assigned => feedback |
2023-10-20 09:37 | DenisChenu | Relationship added | related to 19182 |
2023-10-25 18:48 | gabrieljenik | Relationship replaced | has duplicate 19182 |
2023-10-25 18:48 | gabrieljenik | Bug heat | 38 => 44 |
2023-10-25 18:48 | gabrieljenik | Issue Monitored: fcatalan | |
2023-10-25 18:48 | gabrieljenik | Bug heat | 44 => 46 |
2023-10-25 19:03 | DenisChenu | Note Added: 78013 | |
2023-11-23 18:22 | francois-charles.hebert | Note Added: 78700 | |
2023-11-23 18:22 | francois-charles.hebert | File Added: image_2023-11-23_121838376.png | |
2023-11-23 20:08 | gabrieljenik | Note Added: 78703 | |
2023-11-27 18:43 | francois-charles.hebert | Note Added: 78750 | |
2023-11-27 18:48 | francois-charles.hebert | Note Added: 78751 | |
2023-11-27 23:37 | gabrieljenik | Note Added: 78753 | |
2023-11-28 08:51 | DenisChenu | Note Added: 78756 | |
2023-11-28 08:52 | DenisChenu | Status | feedback => ready for testing |
2023-11-28 08:52 | DenisChenu | Status | ready for testing => ready for merge |
2023-11-28 08:52 | DenisChenu | Note Added: 78757 | |
2023-11-28 17:04 | tibor.pacalat | Note Added: 78785 | |
2023-11-28 20:34 | gabrieljenik | Note Added: 78796 | |
2023-11-29 16:27 | tibor.pacalat | Status | ready for merge => resolved |
2023-11-29 16:27 | tibor.pacalat | Resolution | open => fixed |
2023-11-29 16:35 | Changeset attached | => LimeSurvey 5.x 9d4abed0 | |
2023-11-29 16:35 | guest | Note Added: 78810 | |
2023-11-29 16:35 | guest | Bug heat | 46 => 48 |
2023-11-30 09:03 | cartwheeljoint | Note Added: 78816 | |
2023-11-30 09:03 | cartwheeljoint | Bug heat | 48 => 50 |
2023-11-30 12:52 | Mazi | Note Added: 78821 | |
2023-11-30 13:55 | gabrieljenik | Status | resolved => ready for code review |
2023-11-30 13:55 | gabrieljenik | Note Added: 78828 | |
2023-12-04 13:02 | LimeBot | Note Added: 78863 | |
2023-12-04 13:02 | LimeBot | Status | ready for code review => closed |
2023-12-04 13:02 | LimeBot | Bug heat | 50 => 52 |
2023-12-04 13:41 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-12-04 13:41 | gabrieljenik | Status | closed => ready for code review |
2023-12-04 16:16 | DenisChenu | Note Added: 78866 | |
2023-12-04 16:16 | DenisChenu | Status | ready for code review => ready for testing |
2023-12-04 16:35 | gabrieljenik | Note Added: 78867 | |
2023-12-04 16:38 | DenisChenu | Note Added: 78868 | |
2023-12-04 17:03 | gabrieljenik | Note Added: 78869 | |
2023-12-04 17:09 | DenisChenu | Note Added: 78870 | |
2023-12-05 16:15 | Changeset attached | => LimeSurvey master ad076b19 | |
2023-12-05 16:15 | guest | Note Added: 78881 | |
2023-12-05 16:15 | DenisChenu | Status | ready for testing => resolved |
2023-12-05 16:15 | DenisChenu | Note Added: 78882 | |
2023-12-11 13:03 | LimeBot | Note Added: 78936 | |
2023-12-11 13:03 | LimeBot | Status | resolved => closed |