6.0.0-beta1
8/10/25

[#13092] Can't create new folders via Ingo app
Summary Can't create new folders via Ingo app
Queue Ingo
Queue Version 3.1.4
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester maciej.uhlig (at) us (dot) edu (dot) pl
Created 04/01/2014 (4149 days ago)
Due
Updated 04/07/2014 (4143 days ago)
Assigned 04/02/2014 (4148 days ago)
Resolved 04/07/2014 (4143 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/07/2014 08:48:04 PM Michael Slusarz State ⇒ Resolved
 
04/07/2014 08:47:59 PM Git Commit Comment #15 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_1):

commit f3fe42724404bc139668c582cc586abba67645f3
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Apr 7 14:06:48 2014 -0600

     Bug #13092: allow new mailbox name to be provided on spam page

  ingo/lib/Form/Spam.php |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/f3fe42724404bc139668c582cc586abba67645f3
04/07/2014 08:23:42 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #14 Reply to this comment
Does this fix?
Yes :-)
04/07/2014 08:07:12 PM Michael Slusarz Comment #13
Assigned to Michael Slusarz
Reply to this comment
Does this fix?
04/07/2014 08:07:00 PM Git Commit Comment #12 Reply to this comment
Changes have been made in Git (master):

commit 8fa398a08020e44a3da986cc303f916154ef2f86
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Apr 7 14:06:48 2014 -0600

     Bug #13092: allow new mailbox name to be provided on spam page

  ingo/lib/Form/Spam.php |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/8fa398a08020e44a3da986cc303f916154ef2f86
04/05/2014 09:02:25 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #11 Reply to this comment
You'll have to debug exactly *why* the isset call is failing on that 
data in Horde_Variables then.  Since I can't reproduce.
Well, done. Actually the problem is what's being checked while 
returning from __isset() function in .\Horde\.Variables.php:

         return count($this->_expected)
             ? $this->_getExists($this->_expected, $varname, $value)
             : $this->_getExists($this->_vars, $varname, $value);

count($this->_expected) is equal to 3 so $this->_expected is checked 
instead of $this->_vars. Obviously folder_new name is missing from 
expected array.

Although I don't know how do you want to fix it so I don't provide a patch.

04/04/2014 09:13:21 PM Michael Slusarz Comment #10 Reply to this comment
You'll have to debug exactly *why* the isset call is failing on that 
data in Horde_Variables then.  Since I can't reproduce.
04/03/2014 07:12:00 AM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #9 Reply to this comment
   (The mailbox name doesn't happen to contain non-ASCII characters does it?)
It's pure ASCII.
I don't like to blame PHP versions... but nobody else is reporting 
this so I'm not sure what else could be the issue.
Environment (i.e. static public function)?
04/03/2014 06:51:22 AM Michael Slusarz Comment #8 Reply to this comment
Then it doesn't work too (throws exception as before).
Looking at the code (Horde_Variables), there should be no way that a 
get() call is successful when an isset() call is not.  Especially 
since the contents of that form ID is not an empty-ish value.  (The 
mailbox name doesn't happen to contain non-ASCII characters does it?)

I don't like to blame PHP versions... but nobody else is reporting 
this so I'm not sure what else could be the issue.
04/03/2014 06:46:35 AM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #7 Reply to this comment
this doesn't work (condition is false):

if (isset($vars->$new_id)) {
What if you change to:

if ($vars->exists($new_id))
Then it doesn't work too (throws exception as before).
(If that works, then it pretty much proves your PHP version is broken).
Actually OS is the newest CentOS 6 with php 5.3.28 coming from IUS repo.

Would you recommend upgrade to PHP 5.4? Would Horde work with this?
04/03/2014 06:16:09 AM Michael Slusarz Comment #6 Reply to this comment
this doesn't work (condition is false):

if (isset($vars->$new_id)) {
What if you change to:

if ($vars->exists($new_id))

(If that works, then it pretty much proves your PHP version is broken).
04/02/2014 05:18:16 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #5 Reply to this comment
Just one final note:

this doesn't work (condition is false):

if (isset($vars->$new_id)) {

this does work (condition is true):

$vars_new_id = $vars->$new_id;
if (isset($vars_new_id)) {

Don't ask me why. I'm asking you :-)

04/02/2014 01:15:21 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #4 Reply to this comment
Please follow the hints at 
http://wiki.horde.org/FAQ/Admin/Troubleshoot#wsod to generate and 
find a useful error message.
Actually that was not easy. Only one line was found:

Could not validate IMAP mailbox. [pid 8036 on line 27 of 
"/usr/share/pear/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]

I had to do some handjob with the code. This is what I've found:

Let's take line 128 of .\ingo\lib\Ingo.php:

        if (isset($vars->$new_id)) {

$vars->$new_id is equal to "newfoldernameIgave"

However,

  isset($vars->$new_id) evaluates to FALSE (!!!). Therefore mailbox is 
not created and validation fails.

Replacing line 128 by:

if ( true ) {

allows correct Spam folder creation.

In this case however "Save and disable" later produces another PHP error.

I hope you can sort it out properly.
04/02/2014 08:00:31 AM Jan Schneider Comment #3
Priority ⇒ 1. Low
State ⇒ Feedback
Reply to this comment
Additionally, looking closer for the problem reason in 
./ingo/lib/Ingo.php I found:

- "if ($GLOBALS['registry']->hasMethod('mail/createMailbox') {}" 
expression doesn't return any true or false value, but produces 
white screen when called from the script or from the Horde admin PHP 
shell in Ingo context;
Please follow the hints at 
http://wiki.horde.org/FAQ/Admin/Troubleshoot#wsod to generate and find 
a useful error message.
- also there is no "mail/createMailbox" method in the registry 
(although I can see other elements as "mail/blacklistFrom" or 
"mail/applyFilters" there).
It's there, just not individually specified in the registry configuration.
04/02/2014 06:39:31 AM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #2 Reply to this comment
Additionally, looking closer for the problem reason in 
./ingo/lib/Ingo.php I found:

- "if ($GLOBALS['registry']->hasMethod('mail/createMailbox') {}" 
expression doesn't return any true or false value, but produces white 
screen when called from the script or from the Horde admin PHP shell 
in Ingo context;

- also there is no "mail/createMailbox" method in the registry 
(although I can see other elements as "mail/blacklistFrom" or 
"mail/applyFilters" there).
04/01/2014 05:35:59 PM maciej (dot) uhlig (at) us (dot) edu (dot) pl Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Due ⇒ 04/02/2014
Summary ⇒ Can't create new folders via Ingo app
Type ⇒ Bug
Queue ⇒ Ingo
Reply to this comment
We're using: horde 5.1.6, imp 6.1.7 and ingo 3.1.4

Ingo uses sieve as a backend. Other backends are disabled.

When I try to create spam rule that moves spam to a specific new   
mailbox, create new mailbox function doesn't work. An error "Could not 
  validate IMAP mailbox." is shown after trying to save new rule.

I can create new mailboxes via IMP or other mail clients, but not via INGO.

Managesieve shows debug output but there is no sign of mailbox 
creation attempt.

Looks like sieve protocol works because sieve scriipt is succesfully 
stored on IMAP server. Just the mailbox is not being created.

The problem looks very similar to http://bugs.horde.org/ticket/12174 .


Saved Queries