attachements on public form error

Any critical bugs will be fixed within 24-48 hours.
Post Reply
metwra
Posts: 169
Joined: 22 Jan 2017, 03:16
Name: Jake
Location: UK

attachements on public form error

Post by metwra »

Hi i just tested a public form that has an attachments field


Warning: count(): Parameter must be an array or an object that implements Countable in /home/tttt/public_html/tttt.co.uk/includes/classes/attachments.php on line 63

User avatar
support
Site Admin
Posts: 3786
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: attachements on public form error

Post by support »

File from archive replace to \includes\classes\
Let me know if it works ok now.
Attachments
attachments.zip
(3.69 KiB) Downloaded 6 times

metwra
Posts: 169
Joined: 22 Jan 2017, 03:16
Name: Jake
Location: UK

Re: attachements on public form error

Post by metwra »

Hi the error isnt showing but neither is the uploaded file it seems to act like its uploading then just refreshes

User avatar
support
Site Admin
Posts: 3786
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: attachements on public form error

Post by support »

Form is in iframe? Then do next
Open config/server.php and find next line:

Code: Select all

define('SESSION_FORCE_COOKIE_USE',true);
Replace it to:

Code: Select all

if(strstr($_SERVER['REQUEST_URI'],'ext/public/form'))
  {
    define('SESSION_FORCE_COOKIE_USE',false);    
  }
  else
  {
    define('SESSION_FORCE_COOKIE_USE',true);
  }

metwra
Posts: 169
Joined: 22 Jan 2017, 03:16
Name: Jake
Location: UK

Re: attachements on public form error

Post by metwra »

Hi Sergey

I have already added that code after the public forms stopped sending.
The forms send ok now but the attachments wont upload.

They do if using the direct link to a public form just not as an iframe it seems.

User avatar
support
Site Admin
Posts: 3786
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: attachements on public form error

Post by support »

Send link to the form in PM

Post Reply