Topic on Extension talk:CIForms

Submissions page not showing the submitted forms and no notification alerts for the submitted pages

15
Saibgs (talkcontribs)

Hello Team.

we are using CIForms extensions 1.38 version.

we are not able to see the submissions on this page : https://*******/index.php/Special:CIFormsManage.

When we installed the extensions, the tables created without prefix( offcourse 1.38v is having tables without prefix) and these tables doesn't get updated with the submitted data.

So i had to manually create tables with prefix ( mw_) and the tables get updated post form submission.

Now, when we check the submission page under Special:CIFormsManage , can't see the submission data..... out of interest i did go and reloaded the data from mw_CIForms* tables to CIForms tables .. then i can see submission data. I think still MW is referring the without prefix tables rather than the tables with prefix.

I see from old tickets that this prefix issue was fixed in master build but it was not released in version, currently the way we setup the MW on k8s is to install the extensions basis the version tag....

Could you please help me on how to fix the issue ? will I need to update any config to tell MW to use prefix tables.

Thanks

Sainath

Saibgs (talkcontribs)

I have downloaded master build and it works fine, but i cannot download the form from submissions page is this some issue in the code ?

Thomas-topway-it (talkcontribs)
Saibgs (talkcontribs)

@Thomas-topway-it

Thanks for the update, yes i used the CIForms-master* and it is working fine.

under the submissions page -> we can see the submitted forms here --> click on action:view , where you can see all forms and download them..but sometimes the download button is not working if i refresh then it works.Unable to attach the screenshot.

Also, i wanted to use email notification to be sent when every there is a form submission done, i am using this ($wgCIFormsEmailTo) parameter in the localsettings.php but it is not working. i have smtp configured and working fine but not the submission alerts.

Thomas-topway-it (talkcontribs)

@Saibgs regarding email notification you have to run composer update --no-dev inside the folder extensions/CIForms, regarding the issue with the download button I'm not sure, it does not depend by Javascript so page reload shouldn't affect

Saibgs (talkcontribs)

Thnaks @Thomas-topway-it.


Below are the results after ruunning the composer update --no-dev


php /tmp/composer.phar update --no-dev

931Loading composer repositories with package information

932Info from https://repo.packagist.org: #StandWithUkraine

933Updating dependencies

934Lock file operations: 0 installs, 6 updates, 0 removals

935 - Downgrading psr/container (2.0.2 => 1.1.2)

936 - Downgrading psr/log (2.0.0 => 1.1.4)

937 - Upgrading symfony/console (v5.4.10 => v5.4.11)

938 - Downgrading symfony/deprecation-contracts (v3.1.1 => v2.5.2)

939 - Downgrading symfony/service-contracts (v3.1.1 => v2.5.2)

940 - Downgrading symfony/string (v6.1.2 => v5.4.11)

941Writing lock file

942Installing dependencies from lock file

943Nothing to install, update or remove

944Generating autoload files


and added $wgCIFormsEmailTo to the localsetting.php.

But i don't see any email received after submitting a test form. Do i need to change/update any config ?


Thanks

Thomas-topway-it (talkcontribs)

ok, let me check ...

Thomas-topway-it (talkcontribs)
Saibgs (talkcontribs)
Thomas-topway-it (talkcontribs)

hello @Saibgs it seems the right branch, so if you are using it or you have replaced the file includes/specials/CIFormsSubmit.php it should work fine.

Can you ensure that this line $local = preg_split( "/\s*,\s*/", $local, -1, PREG_SPLIT_NO_EMPTY ); is present ?

If so, and still it does not work, can you insert var_dump($submit_valid);

before the first occurrence of $success = false;

in the same file. This should inform you if the email has been correctly parsed. Also, can you send your configuration (limited to the CIForms parameters in LocalSettings.php) to thomas.topway.it@mail.com so I can check it ?

Saibgs (talkcontribs)

Hello @Thomas-topway-it ,

Sorry for delay.

Below is the part of code after insert "var_dump($submit_valid);"


foreach ( $formSubmit as $email ) {

var_dump($submit_valid);

if ( Sanitizer::validateEmail( $email ) ) {

$submit_valid[] = $email;

}

}

$success = false;


also, I have sent a email ( from: saichi@bgs.ac.uk ) with limited to CIForms.


after adding all the bit in the code, I tested a submission and got below error.


Error:

/var/www/html/Special:CIFormsSubmit, referer: https://SITE/index.php/Feedback                                            │

│ sh: 1: /usr/sbin/sendmail: not found                                                      


I did see the same error before when I was testing forgot password functionality where "set_include_path('/opt/www-scripts')" in Localsettings.php was causing the problem and after removing it resolved the issue. Not sure why i am seeing that again.


Thanks

Sainath

Thomas-topway-it (talkcontribs)

what is the output of var_dump($submit_valid); ?

by the way it seems a server config error, related to sendmail, are you able in general to send email with your server ?

Saibgs (talkcontribs)

hello @Thomas-topway-it,


Sorry for delay, not able to progress on this issue as i am getting on 504 gateway time out once i clock on submit on feedback form. all my network is allowed and no restrictions but still i see this issue stopping me to debug the email alerts.

Thomas-topway-it (talkcontribs)

It could be related to PhpMailer

https://github.com/PHPMailer/PHPMailer

perhaps can you create a separate script and try to send an email manually ? (through the script) so you know if it is related to PhpMailer on your system

This post was hidden by Thomas-topway-it (history)
Reply to "Submissions page not showing the submitted forms and no notification alerts for the submitted pages"