Summary | Can't autosubmit to a ticket from Horde |
Queue | Whups |
Queue Version | 2.0-RC1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | simon (at) simonandkate (dot) net |
Created | 10/14/2011 (5013 days ago) |
Due | |
Updated | 08/30/2012 (4692 days ago) |
Assigned | 10/14/2011 (5013 days ago) |
Resolved | 08/09/2012 (4713 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
pear channel?
it to confirm the fix, but will do so this weekend.
Is there a timeframe for these changes to make release in the main
pear channel?
commit 51eb12a7ddd3462d198e52ee1970870c527856ef
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:31:24 2012 +0200
[jan] Fix auto-submitting of tickets if using groups (
Bug #10654).Conflicts:
whups/package.xml
whups/docs/CHANGES | 1 +
whups/package.xml | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/51eb12a7ddd3462d198e52ee1970870c527856ef
commit 83265ac2be9696d444667ce53f5e80cec1edb4fe
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:23:36 2012 +0200
Default to access for all groups (
Bug #10654).whups/lib/Form/Ticket/CreateStepThree.php | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/83265ac2be9696d444667ce53f5e80cec1edb4fe
commit e344ad4a6ad40327269adb9e43e8a21986139354
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 15:03:52 2012 +0200
[jan] Fix adding attachments to problem tickets (
Bug #10654).Conflicts:
horde/package.xml
horde/docs/CHANGES | 1 +
horde/package.xml | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/e344ad4a6ad40327269adb9e43e8a21986139354
commit b4cd881e2d14331057e0a96a382b9fb8aa7a1e1c
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 14:28:53 2012 +0200
Fix adding attachments to problem tickets (
Bug #10654).horde/services/problem.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/b4cd881e2d14331057e0a96a382b9fb8aa7a1e1c
State ⇒ Resolved
commit 51eb12a7ddd3462d198e52ee1970870c527856ef
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:31:24 2012 +0200
[jan] Fix auto-submitting of tickets if using groups (
Bug #10654).Conflicts:
whups/package.xml
whups/docs/CHANGES | 1 +
whups/package.xml | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/51eb12a7ddd3462d198e52ee1970870c527856ef
commit 45c2e297e8554913cbc290e62986dde270363325
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:31:24 2012 +0200
[jan] Fix auto-submitting of tickets if using groups (
Bug #10654).whups/docs/CHANGES | 1 +
whups/package.xml | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/45c2e297e8554913cbc290e62986dde270363325
commit 0019012dcc49ec8d0a0fa37285fabfa39dca171f
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:23:36 2012 +0200
Default to access for all groups (
Bug #10654).whups/lib/Form/Ticket/CreateStepThree.php | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/0019012dcc49ec8d0a0fa37285fabfa39dca171f
commit 83265ac2be9696d444667ce53f5e80cec1edb4fe
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 19:23:36 2012 +0200
Default to access for all groups (
Bug #10654).whups/lib/Form/Ticket/CreateStepThree.php | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/83265ac2be9696d444667ce53f5e80cec1edb4fe
commit e344ad4a6ad40327269adb9e43e8a21986139354
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 15:03:52 2012 +0200
[jan] Fix adding attachments to problem tickets (
Bug #10654).Conflicts:
horde/package.xml
horde/docs/CHANGES | 1 +
horde/package.xml | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/e344ad4a6ad40327269adb9e43e8a21986139354
commit 2d21217e9af93969448f58fd145249cf8452ac42
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 15:03:52 2012 +0200
[jan] Fix adding attachments to problem tickets (
Bug #10654).horde/docs/CHANGES | 1 +
horde/package.xml | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/2d21217e9af93969448f58fd145249cf8452ac42
commit fe0d93af0caa609ba2dceccea24983b21560eec5
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 14:28:53 2012 +0200
Fix adding attachments to problem tickets (
Bug #10654).Conflicts:
horde/services/problem.php
horde/services/problem.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/fe0d93af0caa609ba2dceccea24983b21560eec5
commit b4cd881e2d14331057e0a96a382b9fb8aa7a1e1c
Author: Jan Schneider <jan@horde.org>
Date: Thu Aug 9 14:28:53 2012 +0200
Fix adding attachments to problem tickets (
Bug #10654).horde/services/problem.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/b4cd881e2d14331057e0a96a382b9fb8aa7a1e1c
horde and whups (even went so far as to install a testbed server with
nothing other than whups installed on horde framework).
I was able to get it working without modifying any files at all by
adding group in the array define. Something like this (notice i define
group):
array('queue' => 1, 'state' => 1, 'priority' => 1, 'type' => 1,'group' => 1)
Maybe not the best solution, but seemed to be the least intrusive way
to find a workaround.
I have disabled adding of attachments to auto-submitted tickets, and
so the submission of tickets now appears to work fine (although it
does not advise "Your ticket number is...").
The fatal error for web page redirect is not occurring any more.
So - summary:
1. It is running with the section of
lib/Form/TicketCreateStepThree.php commented out as noted in Comment
19 below
2. It is successfully creating auto-submitted tickets, but does not
notify the user of the ticket number
3. Adding attachments to autosubmitted tickets breaks it
4. I am sure that my commenting the groups section out will have
broken something else, I just haven't found what yet.
Any help available?
If I try and log a Problem from services/Problem.php with an
attachment, I get an error on the screen:
ErrorInvalid Ticket Id
And the following Debug in log:
2012-06-01T21:45:00+10:00 NOTICE: HORDE [horde] PHP ERROR: Undefined
variable: result [pid 1698 on line 86 of
"/var/www/horde4/services/problem.php"]
2012-06-01T21:45:00+10:00 DEBUG: HORDE 1. Horde::errorHandler()
/var/www/horde4/services/problem.php:86
2012-06-01T21:45:00+10:00 DEBUG: HORDE [horde] 1.
Horde::errorHandler() /var/www/horde4/services/problem.php:86
[pid 1698 on line 240 of "/usr/share/pear/Horde.php"]
2012-06-01T21:45:00+10:00 DEBUG: HORDE [horde] Invalid Ticket Id [pid
1698 on line 27 of
"/usr/share/pear/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]
2012-06-01T21:45:00+10:00 DEBUG: HORDE [horde] Max memory usage:
35913728 bytes [pid 1698 on line 476 of
"/usr/share/pear/Horde/Registry.php"]
The attachment is a 25KB text file.
Logging a ticket with an attachment from within Whups itself works fine.
now running lib/Form/TicketCreateStepThree.php with this section
removed:
/* Comment permissions. */
$groups = $GLOBALS['injector']->getInstance('Horde_Group');
$mygroups = $groups->listGroups($GLOBALS['registry']->getAuth());
if ($mygroups) {
foreach (array_keys($mygroups) as $gid) {
$grouplist[$gid] = $groups->getName($gid, true);
}
asort($grouplist);
$grouplist = array(0 => _("This comment is visible to
everyone")) + $grouplist;
$this->addVariable(
_("Make this comment visible only to members of a
group?"), 'group',
'enum', false, false, null, array($grouplist));
}
And it seems to be working OK, but I am sure that will have broken
something else somewhere else!
error for the redirect:
function _returnToPage()
{
$url = new Horde_Url(Horde_Util::getFormData('return_url',
Horde::url('login.php', true, array('app' => 'horde'))));
$url->redirect();
}
That seems to call this public function in Url.php:
public function redirect()
{
$url = strval($this->setRaw(true));
if (!strlen($url)) {
throw new Horde_Url_Exception('Redirect failed: URL is empty.');
}
header('Location: ' . $url);
exit;
}
First of all, reset all the Type / State / Priority etc, and confirmed
that Horde config is set correctly.
Then tracked down the issue in Api.php to the section that reads:
if (!$form3->validate($vars, true)) {
$f3 = var_export($form3->getErrors(), true);
throw new Whups_Exception("Invalid arguments ($f3)");
}
Take that out and the ticket is created fine (albeit with an empty
redirect URL fatal error - the ticket is fine).
Follow that further to lib/Form/TicketCreateStepThree.php. Take out
the section:
/* Comment permissions. */
$groups = $GLOBALS['injector']->getInstance('Horde_Group');
$mygroups = $groups->listGroups($GLOBALS['registry']->getAuth());
if ($mygroups) {
foreach (array_keys($mygroups) as $gid) {
$grouplist[$gid] = $groups->getName($gid, true);
}
asort($grouplist);
$grouplist = array(0 => _("This comment is visible to
everyone")) + $grouplist;
$this->addVariable(
_("Make this comment visible only to members of a
group?"), 'group',
'enum', false, false, null, array($grouplist));
}
And the ticket is created correctly (same redirect error).
The Fatal error is:
A fatal error has occurred
Redirect failed: URL is empty.
1. _returnToPage() /var/www/horde4/services/problem.php:96
2. Horde_Url->redirect() /var/www/horde4/services/problem.php:15
Details
The full error message is logged in Horde's log file, and is shown
below only to administrators. Non-administrative users will not see
error details.
Horde_Url_Exception Object
(
[_previous:private] =>
[details] =>
[message:protected] => Redirect failed: URL is empty.
[string:private] =>
[code:protected] => 0
[file:protected] => /usr/share/pear/Horde/Url.php
[line:protected] => 326
[trace:private] => Array
(
[0] => Array
(
[file] => /var/www/horde4/services/problem.php
[line] => 15
[function] => redirect
[class] => Horde_Url
[type] => ->
[args] => Array
(
)
)
[1] => Array
(
[file] => /var/www/horde4/services/problem.php
[line] => 96
[function] => _returnToPage
[args] => Array
(
)
)
)
)
But hey! at least the ticket is created.
that matches it, and the action fails - no ticket is logged.
I have listed my config, and worked through some of the structure
issues. I am not sure what else I can tell you Jan - what other
troubleshooting can I do to assist?
can further troubleshoot this...
that matches it, and the action fails - no ticket is logged.
I have listed my config, and worked through some of the structure
issues. I am not sure what else I can tell you Jan - what other
troubleshooting can I do to assist?
continue running.
UI error: Invalid arguments (array ( 'group' => 'Invalid data submitted.', ))
Log error:
2011-11-04T13:20:28+10:00 DEBUG: HORDE [horde] Invalid arguments (array (
'group' => 'Invalid data submitted.',
)) [pid 2544 on line 27 of
"/usr/share/pear/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]
still exists at all?
New Attachment: hordedebug.txt
Line 1280+ appears to be the piece of interest.
'group' => 'Ungültige Daten eingegeben.', ))"
i enabled debug in horde config and these are the last few lines befor
the error pops up:
2011-10-29T09:15:53+02:00 DEBUG: HORDE [wicked] Load config file
(conf.php; app: wicked) [pid 14065 on line 865 of
"/var/www/pear/php/Horde.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0003s)
SELECT queue_id, queue_name FROM whups_queues ORDER BY
queue_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT queue_id, queue_name, queue_description, queue_versioned,
queue_slug, queue_email FROM whups_queues WHERE queue_id =
2 [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT queue_id, queue_name, queue_description, queue_versioned,
queue_slug, queue_email FROM whups_queues WHERE queue_id =
1 [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0004s)
SELECT t.type_id, t.type_name FROM whups_types t, whups_types_queues
tm WHERE tm.queue_id = 1 AND tm.type_id = t.type_id ORDER BY
t.type_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT type_id FROM whups_types_queues WHERE type_default = 1 AND
queue_id = 1 [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0004s)
SELECT state_id, state_name FROM whups_states WHERE type_id = 2 AND
(state_category = 'unconfirmed') ORDER BY state_category,
state_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT attribute_id, attribute_name, attribute_description,
attribute_type, attribute_params, attribute_required FROM
whups_attributes_desc WHERE type_id = 2 ORDER BY
attribute_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0003s)
SELECT state_id, state_name FROM whups_states WHERE type_id = 2 AND
(state_category = 'new' OR state_category = 'assigned') ORDER BY
state_category, state_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0003s)
SELECT state_id FROM whups_states WHERE state_default = 1 AND type_id
= 2 [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0003s)
SELECT priority_id, priority_name FROM whups_priorities WHERE type_id
= 2 ORDER BY priority_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT priority_id FROM whups_priorities WHERE priority_default = 1
AND type_id = 2 [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0004s)
SELECT g.group_uid AS group_uid, g.group_name AS group_name FROM
horde_groups g, horde_groups_members m WHERE m.user_uid =
'test@bigmichi1.de' AND g.group_uid = m.group_uid ORDER BY
g.group_name [pid 14065 on line 803 of
"/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [whups] SQL (0,0002s)
SELECT group_name FROM horde_groups WHERE group_uid = 2 [pid
14065 on line 803 of "/var/www/pear/php/Horde/Db/Adapter/Base.php"]
2011-10-29T09:15:53+02:00 DEBUG: HORDE [horde] Invalid arguments (array (
'group' => 'Ungültige Daten eingegeben.',
)) [pid 14065 on line 27 of
"/var/www/pear/php/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]
mysql> SELECT g.group_uid AS group_uid, g.group_name AS group_name
-> FROM horde_groups g, horde_groups_members m
-> WHERE m.user_uid = 'test@bigmichi1.de'
-> AND g.group_uid = m.group_uid
-> ORDER BY g.group_name;
+-----------+------------+
| group_uid | group_name |
+-----------+------------+
| 2 | Admin |
+-----------+------------+
1 row in set (0.00 sec)
mysql> SELECT group_name FROM horde_groups WHERE group_uid = 2;
+------------+
| group_name |
+------------+
| Admin |
+------------+
1 row in set (0.00 sec)
post back over the weekend.
with this error. Also, do you happen to use the SQL (NOT the SQL-NG)
driver for shares?
Auto submit fails as noted. I have no groups in any of the
whups_*groups SQL tables.
I have Horde groups, yes - is that what this is looking for? If so,
again it should be fine - there is a HordeTicketAccess LDAP group that
includes me with permissions to show / read / edit / delete tickets
(at the group level). It allows me to manually create tickets. It is
the only permission set against Tickets (whups), and there are no
child permissions.
Should have checked the logs earlier though:
2011-10-19T22:32:42+10:00 ERR: HORDE [horde] SQL QUERY FAILED:
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'horde.whups_groups' doesn't exist
select * from whups_groups [pid 21254 on line 812 of
"/usr/share/pear/Horde/Db/Adapter/Base.php"]
It's correct, there is no whups_groups table.
If submitting a ticket needs it, why does it work manually? And why
don't I have the table?
Whups is at version 2.0-RC2 and has been installed the normal pear
way, with no modifying, and upgraded from alpha to RC1 then RC2.
Summary ⇒ Can't autosubmit to a ticket from Horde
explicitly checks if the currently logged-in user has some groups
(whups/lib/Form/Ticket/CreateStepThree.php line 91).
OK, I see that the values in that statement have to match the related
values in the database. So for Type of 1 (which I have as Fault), the
matching available states are 6,7,8,9,10, where 6 is unconfirmed. So
with State 6, Type 1, valid Priorities are 4,5,6. 4 being Low, I now
have:
array('queue' => 1, 'state' => 6, 'priority' => 4, 'type' => 1)
That should be a valid combination.
Still gives me:
Invalid arguments (array ( 'group' => 'Invalid data submitted.', ))
Invalid arguments (array ( 'state' => 'Invalid data submitted.',
'priority' => 'Invalid data submitted.', 'group' => 'Invalid data
submitted.', ))
So it's degenerating, not getting better... :(
The Horde code is:
$conf[problems][ticket_params]
array('queue' => 1, 'state' => 1, 'priority' => 1, 'type' => 1)
Looking at select * from whups_states shows:
state_id type_id state_name state_description state_category state_default
1 2 Unconfirmed A ticket has been reported but not yet analyzed unconfirmed 0
2 2 Accepted The ticket has been analyzed and accepted as valid. new 0
3 2 Assigned Someone has accepted responsibility for the ticket. assigned 0
4 2 Resolved The ticket has been resolved. resolved 0
5 2 Canceled The ticket is no longer valid for one reason or another.
resolved 0
6 1 Unconfirmed A ticket has been reported but not yet analyzed unconfirmed 0
7 1 Accepted The ticket has been analyzed and accepted as valid. new 0
8 1 Assigned Someone has accepted responsibility for the ticket. assigned 0
9 1 Resolved The ticket has been resolved. resolved 0
10 1 Canceled The ticket is no longer valid for one reason or another.
resolved 0
11 4 Unconfirmed A ticket has been reported but not yet analyzed unconfirmed 0
12 4 Accepted The ticket has been analyzed and accepted as valid. new 0
13 4 Assigned Someone has accepted responsibility for the ticket. assigned 0
14 4 Resolved The ticket has been resolved. resolved 0
15 4 Canceled The ticket is no longer valid for one reason or another.
resolved 0
With both priority_id and state_id 1 having a type_id of 2, I changed
the Horde code to be:
array('queue' => 1, 'state' => 1, 'priority' => 1, 'type' => 2)
That gets a bit further:
Invalid arguments (array ( 'group' => 'Invalid data submitted.', ))
I'm not actually calling group anywhere! Nor do I have any groups in SQL.
State ⇒ Feedback
There is some error further down in the method though, fixed by:
http://git.horde.org/horde-git/-/commit/4ea879e116216b5e78f05d4240ad11e4b9212141
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Whups
Type ⇒ Bug
Summary ⇒ Can't autosubmmit to a ticket from Horde
$conf[problems][ticket_params] in Horde is set to: array('queue' =>
1, 'state' => 1, 'priority' => 1, 'type' => 1)
In the Whups database tables, there exist queue of 1, state of 1,
priority of 1, and type of 1. Yet creating a 'problem' within Horde
and submitting it generates the following STOP error:
Invalid arguments (array ( 'state' => 'Invalid data submitted.',
'priority' => 'Invalid data submitted.', ))
Have I got the conf entry wrong?
No, looks correct. Create a ticket on bugs.horde.org.
Jan.