-
Notifications
You must be signed in to change notification settings - Fork 6
Doesn't work with 1.11 or 1.12 - Plans to update to latest osTicket versions? #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Huh, Staff objects aren't Users anymore? Interesting.
Now the irritation, I'll have to write branches that for each version..
which goes against the whole point of plugins in the first place, or force
everyone who uses it to upgrade.
Thanks for the report mate, answer: yes.
We use this plugin a lot, so I'll be adding support soon. Likely before
we've upgraded.
…On Fri, 12 Jul. 2019, 03:44 nminaker, ***@***.***> wrote:
Hi there,
I'm running osTicket v 1.11 and I tried your plugin (which seems like a
great addition to the core functionality), but it throws an exception. So I
was just wondering if you were planning to update this plugin to function
in the newest versions?
This is the error I get when I add mentions into a ticket.
[Thu Jul 11 13:16:43.299811 2019] [php7:error] [pid 19673] [client
10.0.50.64:59867] PHP Fatal error: Uncaught InvalidArgumentException:
User expected in /var/www/html/osticket/include/class.user.php:1369\nStack
trace:\n#0
/var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(92):
UserList->add(Object(Staff))\n#1
/var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(48):
MentionerPlugin->checkThreadTextForMentions(Object(MessageThreadEntry))\n#2
/var/www/html/osticket/include/class.signal.php(98):
MentionerPlugin->{closure}(Object(MessageThreadEntry), NULL)\n#3
/var/www/html/osticket/include/class.thread.php(1671):
Signal::send('threadentry.cre...', Object(MessageThreadEntry))\n#4
/var/www/html/osticket/include/class.thread.php(1677):
ThreadEntry::create(Array)\n#5
/var/www/html/osticket/include/class.thread.php(2748):
ThreadEntry::add(Array)\n#6
/var/www/html/osticket/include/class.thread.php(2963):
MessageThreadEntry::add(Array, Array)\n#7
/var/www/html/osticket/include/class.ticket.php(2700):
ObjectThread->addMessage(Array, Array)\n#8
/var/www/html/osticket/tickets.php(89): in
/var/www/html/osticket/include/class.user.php on line 1369, referer:
https://help.esgsolutions.com/tickets.php
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=ABGXTD3THSVWJTOJXYF5XELP65WQ7A5CNFSM4IBPLRT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6WHGAA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGXTDZ5OUSEDMBHHWTZIZTP65WQ7ANCNFSM4IBPLRTQ>
.
|
Thanks for the response, and thanks for making such a seemingly useful plugin (I say "seemingly" , only because I haven't been able to try it out yet).
Is there a way to check the version and then call one function if its < 1.11 (or in whichever version this functionality changed) and another function if its >= 1.11?
Thanks again.
Cheers,
Nick
|
I don't see why not, the version must be defined in the code somewhere.
…On Fri, 12 Jul. 2019, 10:31 nminaker, ***@***.***> wrote:
Thanks for the response, and thanks for making such a seemingly useful
plugin (I say "seemingly" , only because I haven't been able to try it out
yet).
Is there a way to check the version and then call one function if its <
1.11 (or in whichever version this functionality changed) and another
function if its >= 1.11?
Thanks again.
Cheers,
Nick
Nicholas Minaker
Manager of Field Services and Technical Support
+1-613-217-2719
________________________________
From: Aaron ***@***.***>
Sent: Thursday, July 11, 2019 5:22:53 PM
To: clonemeagain/osticket-plugin-mentioner
Cc: Nicholas Minaker; Author
Subject: Re: [clonemeagain/osticket-plugin-mentioner] Doesn't work with
1.11 or 1.12 - Plans to update to latest osTicket versions? (#11)
Huh, Staff objects aren't Users anymore? Interesting.
Now the irritation, I'll have to write branches that for each version..
which goes against the whole point of plugins in the first place, or force
everyone who uses it to upgrade.
Thanks for the report mate, answer: yes.
We use this plugin a lot, so I'll be adding support soon. Likely before
we've upgraded.
On Fri, 12 Jul. 2019, 03:44 nminaker, ***@***.***> wrote:
> Hi there,
>
> I'm running osTicket v 1.11 and I tried your plugin (which seems like a
> great addition to the core functionality), but it throws an exception.
So I
> was just wondering if you were planning to update this plugin to function
> in the newest versions?
>
> This is the error I get when I add mentions into a ticket.
> [Thu Jul 11 13:16:43.299811 2019] [php7:error] [pid 19673] [client
> 10.0.50.64:59867] PHP Fatal error: Uncaught InvalidArgumentException:
> User expected in
/var/www/html/osticket/include/class.user.php:1369\nStack
> trace:\n#0
>
/var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(92):
> UserList->add(Object(Staff))\n#1
>
/var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(48):
>
MentionerPlugin->checkThreadTextForMentions(Object(MessageThreadEntry))\n#2
> /var/www/html/osticket/include/class.signal.php(98):
> MentionerPlugin->{closure}(Object(MessageThreadEntry), NULL)\n#3
> /var/www/html/osticket/include/class.thread.php(1671):
> Signal::send('threadentry.cre...', Object(MessageThreadEntry))\n#4
> /var/www/html/osticket/include/class.thread.php(1677):
> ThreadEntry::create(Array)\n#5
> /var/www/html/osticket/include/class.thread.php(2748):
> ThreadEntry::add(Array)\n#6
> /var/www/html/osticket/include/class.thread.php(2963):
> MessageThreadEntry::add(Array, Array)\n#7
> /var/www/html/osticket/include/class.ticket.php(2700):
> ObjectThread->addMessage(Array, Array)\n#8
> /var/www/html/osticket/tickets.php(89): in
> /var/www/html/osticket/include/class.user.php on line 1369, referer:
> https://help.esgsolutions.com/tickets.php
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <
#11?email_source=notifications&email_token=ABGXTD3THSVWJTOJXYF5XELP65WQ7A5CNFSM4IBPLRT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6WHGAA
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ABGXTDZ5OUSEDMBHHWTZIZTP65WQ7ANCNFSM4IBPLRTQ
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<
#11?email_source=notifications&email_token=AHGC4ZAGOFAEFRS66YY3QG3P66QC3A5CNFSM4IBPLRT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYAUMA#issuecomment-510659120>,
or mute the thread<
https://github.com/notifications/unsubscribe-auth/AHGC4ZBOMI2X46IRK3BYQBDP66QC3ANCNFSM4IBPLRTQ
>.
This email contains confidential and/or privileged information and may be
read and used only by the intended recipient. Please do not copy any
portions or this email, and do not disseminate its contents to anyone
without our consent. If you are not the intended recipient of this message
please delete it immediately and inform the sender that you have received
this message in error.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=ABGXTD5GF77EKMGHOD7JJWLP67GGDA5CNFSM4IBPLRT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZYKYXI#issuecomment-510700637>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGXTD32PG6B625EMQL4G6TP67GGDANCNFSM4IBPLRTQ>
.
|
hi @clonemeagain long time from last.. ostiket before 1.10 not have way to check corrected version.. so will be a pain.. in some weeks i can make some test and report feedback here! |
Hey Chief, still haven't upgraded our instance yet, business priorities have changed and I've got minimal time for open source projects now. Frustrating. But if you're able to, a pull request would be welcomed |
take easy @clonemeagain i understand! time day it's precious now! right? i'm in same behaviour.. pufff very very frustrating.. but i'll make some space and try to made a pull request! plesase stay alert .. thanks dude! |
While not a proper fix the bodge below gets staff mentions working again in latest version of osTicket (tested in v1.14.1). Line 85, change from
to
At the very bottom add the below (it's the UserList definition from class.user.php in osTicket v1.10.1)
|
@AdamDempsey We got 1.14.1 running and I added your Code. It works, and users can be added as collaborators, thanks! |
same issue here with v1.14.1 when use mentions (#user) |
hi @AdamDempsey @DanielKng and @wgalafassijr , your code @AdamDempsey seems works but need two tings:
so @clonemeagain as you said before logn time ago, staff object aren't users anymore! due the change does no included the people listed in the user database (only staff).. it fails if you search for some of the staff members.. i do not remenber right now the format of.. but like array we must merged and dischard the duplicates (one person in user list also can be the same in staff lits) this seems all the logic must be include in a function that first try the user database and if the mentioned tag are not foud try them the staff databe users. |
We're also installing it on osTicket v1.14.2 and got the same error when using #function. Really look forward to a way to solve this problem! If someone has a way to solve it, please kindly guide. Thanks a lot! |
Also installed on OSTicket v1.14.1 and got the same error using the #agent function. Really want to use this on internal notes which doesn't work with @agent as, even with the code above added, a new user is created and added as a collaborator. The user doesn't get notified about new internal notes. |
@clonemeagain Have you managed to have a look at getting the # mentions working with 1.14.x? |
I am on 1.14.1 and able to get # notification emails after changing the following: |
Worked for me too with this change. Thank you. |
Need to write a version check then branch it. If someone has already done that I'm happy to merge their PR |
that would be more then awesome <3 Adding collaborators over "@" works without a problem, but trying to use "#" for E-Mail notifications gives us this after creating the comment-post:
|
Hey anyone here using this plugin on the latest version? Does it work for you with those fixes? |
i am using it only in older versions.. why i must upgrade if are workinig.. and there's not security issues.. for that i can patch the code.. its php! |
Has anyone had any luck getting this to work with v1.16.x? Tried the above fixes but the #mentions are still throwing an error. Just get an internal server error 500. Interestingly nothing shows up in any php logs. |
Hello @VonSchnitzel |
Hey @XKa-MSF-OCB . Thanks yeah I tried your fix for the function and also just tried directly from bobweston's fork. Interestingly using the forked version gave me an actual PHP error this time:
Not sure what's causing this or how to fix it but it must be something unique to our setup if it works for others. |
Hi there,
I'm running osTicket v 1.11 and I tried your plugin (which seems like a great addition to the core functionality), but it throws an exception. So I was just wondering if you were planning to update this plugin to function in the newest versions?
This is the error I get when I add mentions into a ticket.
[Thu Jul 11 13:16:43.299811 2019] [php7:error] [pid 19673] [client 10.0.50.64:59867] PHP Fatal error: Uncaught InvalidArgumentException: User expected in /var/www/html/osticket/include/class.user.php:1369\nStack trace:\n#0 /var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(92): UserList->add(Object(Staff))\n#1 /var/www/html/osticket/include/plugins/mentioner/class.MentionerPlugin.php(48): MentionerPlugin->checkThreadTextForMentions(Object(MessageThreadEntry))\n#2 /var/www/html/osticket/include/class.signal.php(98): MentionerPlugin->{closure}(Object(MessageThreadEntry), NULL)\n#3 /var/www/html/osticket/include/class.thread.php(1671): Signal::send('threadentry.cre...', Object(MessageThreadEntry))\n#4 /var/www/html/osticket/include/class.thread.php(1677): ThreadEntry::create(Array)\n#5 /var/www/html/osticket/include/class.thread.php(2748): ThreadEntry::add(Array)\n#6 /var/www/html/osticket/include/class.thread.php(2963): MessageThreadEntry::add(Array, Array)\n#7 /var/www/html/osticket/include/class.ticket.php(2700): ObjectThread->addMessage(Array, Array)\n#8 /var/www/html/osticket/tickets.php(89): in /var/www/html/osticket/include/class.user.php on line 1369, referer: https://help.esgsolutions.com/tickets.php
The text was updated successfully, but these errors were encountered: