Support Request SupportSupport Ticket Extension

Support Section
Previous topicNext topic
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
wicy
Users
Users
Status: Offline
User theme: Dark
Posts: 6
Joined: Aug 16th, '17, 20:33
    Windows 7 Firefox

Support Ticket Extension

Post by wicy »

Your phpBB Version: 3.2.1
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Beginner
Boardlink: forgen.pl

PHP Version: 7.0
MySQL Version: ?

What have you done before the problem was there?
Nothing. Just inslalled extension

What have you already tried to solve the problem?
Try to modify files

Description and Message
Your phpBB Version: 3.2.1
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Beginner
Boardlink: forgen.pl

PHP Version: 7.0
MySQL Version: ?

What have you done before the problem was there?
Nothing. Just inslalled extension

What have you already tried to solve the problem?
Try to modify files

Description and Message
Your phpBB Version: 3.2.1
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Beginner
Boardlink: forgen.pl

PHP Version: 7.0
MySQL Version: ?

What have you done before the problem was there?
Nothing. Just inslalled extension

What have you already tried to solve the problem?
Try to modify files

Description and Message
Can anybody help me to fix the problem with dmzx/supportticket (ver 1.0.3)?
It works quite good, but it doubles (multiplies) message content after each use of Preview button.


Here this problem is caused, too.....

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Support Ticket Extension

Post by martin »

Sure open the event within the ext and remove the preview button code why would a post need to be previewed :whistl:
Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
wicy
Users
Users
Status: Offline
User theme: Dark
Posts: 6
Joined: Aug 16th, '17, 20:33
    Windows 7 Firefox

Re: Support Ticket Extension

Post by wicy »

martin wrote: Aug 16th, '17, 20:55 Sure open the event within the ext
Could you explain me what event (which file)?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Support Ticket Extension

Post by martin »

Im looking at the ext now its been a while since i had that one open.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
wicy
Users
Users
Status: Offline
User theme: Dark
Posts: 6
Joined: Aug 16th, '17, 20:33
    Windows 7 Firefox

Re: Support Ticket Extension

Post by wicy »

I tried to force event/listener.php to not react on Post & Preview mode, but it puts form content directly into post message so in next step (after preview) it has message body filled with form text and it adds same form text to existing message.

How to modify listener.php:

Code: Select all

if ($post_data['enable_sts'] == true && ($mode == 'post') && ($subject != ''))
{
...
	$message_parser->message = '';
...
	$message_parser->message .= "[size=" . $sts_size . "][color=#" . $sts_colour . "][b]" . $u0 . "[/b][/color][/size]\n[i]" . $message . "[/i]";
	$post_data['post_text'] = $message_parser->message;
}	
to prevent message from changes during Preview?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Support Ticket Extension

Post by martin »

Dont modify the core of the ext il post a new file for it in a min just doing some testing.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
wicy
Users
Users
Status: Offline
User theme: Dark
Posts: 6
Joined: Aug 16th, '17, 20:33
    Windows 7 Firefox

Re: Support Ticket Extension

Post by wicy »

Any progress? Can you manage to fix that error?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Support Ticket Extension

Post by martin »

I'l takee a look at it today as im off work :eusa_dance:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6486
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Support Ticket Extension

Post by dmzx »

martin wrote: Aug 18th, '17, 07:21 I'l takee a look at it today as im off work :eusa_dance:
:thumbup:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
wicy
Users
Users
Status: Offline
User theme: Dark
Posts: 6
Joined: Aug 16th, '17, 20:33
    Windows 7 Firefox

Re: Support Ticket Extension

Post by wicy »

Because of no response I tried to modify ext by myself.

First I hided form template to prevent filling it once again.
In public function posting_modify_template_vars($event) I added $preview = (isset($_POST['preview'])) ? true : false; and changed condition on if ($post_data['enable_sts'] == true && ($mode == 'post') && (!$preview) && ($subject == ''))

Next I modified public function posting_modify_message_text($event) by adding a new condition before $message_parser->message = '';

Code: Select all

if (($phpbbversion== '') && ($phpbbdescvf== '') && ($phpversion == ''))
      {
      
      }
      else
	{
        $message_parser->message = '';
to prevent of overwritting a previewed message text for a second (and more) time. I use different variabbles, so those above are only example.

Could you try this modifications and let me now if it works?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Android Chrome

Re: Support Ticket Extension

Post by martin »

Will test it at some time for you i have i have multiple family members in and out of hospital so not at home for long.

[ Post made via Android ] Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6486
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Support Ticket Extension

Post by dmzx »

Did some checking on this last time, time is bit an issue here for me to update the extension...

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5132
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Support Ticket Extension

Post by martin »

I'm just about to test the changes as im home for an hour if ok il zip up new files.

Your edits fails the best way around this is to kill the preview button from showing on posting pages that have the support ticket on them (why would any one need to preview is beyond me).

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

testing1
Users
Users
Status: Offline
User theme: Dark
Posts: 39
Joined: May 5th, '17, 19:48
    Windows 10 Chrome

Re: Support Ticket Extension

Post by testing1 »

How hard would it be to take the following out? :wtf:

Image

Image

Previous topicNext topic