#1487958 closed Feature Requests (fixed)
Searching multiple address books suggestion.
| Reported by: | deltatech | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.6-beta |
| Component: | Addressbook | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The new feature of searching multiple address books is a nice feature but. The problem is, if a contact is found in more than one address book and you want to edit that contact, you have no way of knowing which address book you are editing.
It would be nice if when you click on a contact in the search results, the proper address book would then be selected so you would know which address book you are editing and so it saves it to the correct place.
I am currently testing with revision 4856
Change History (11)
comment:1 Changed 2 years ago by alec
comment:2 Changed 2 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Fixed in [cc90ed1f].
comment:3 Changed 2 years ago by deltatech
It wasn't fixed quite right.. It says Personal Address book no matter which address book it is really in. It is displaying the wrong addressbook.
comment:4 Changed 2 years ago by deltatech
One more comment.. not only does it show the wrong address book, but it breaks the ability to search any specific address book. And, it leaves out some address books in the search.
To be more specific...
I have the global address book plugin and the google_contacts plugin which I created. I have one contact that is in the personal address book once, same contact again in the google contacts twice, same contact again in the global contacts.
When I do a search I should find 4, but I find 3. It doesn't find the record in global.
When I click on one of the search results, it shows personal address book no matter which address book it is really in.
comment:5 Changed 2 years ago by alec
So, you probably need to make some changes in these plugins.
comment:6 Changed 2 years ago by deltatech
I am unable to find any plugins that work with your recent change. All address plugins have this problem and I have tried 3.
What could a plugin do to cause this?
What other address book sources have you tested with, which plugin? Maybe I will try it and see if the issue is duplicated here.
If you wish to try the google_contacts plugin, it can be found here.
comment:7 Changed 2 years ago by deltatech
I should also mention that if you would like a test account on my server to see the behavior and FTP access, I would be happy to set that up for you.
comment:8 follow-up: ↓ 9 Changed 2 years ago by deltatech
This breaks a lot more functionality than I had first thought. Dragging and dropping from one address book to another also stopped working. I have tried all combinations of 4 different address books.
This also breaks the ability to search any one address book, it is global or nothing.
It would be nice if this functionality could be disabled in the config. This is the first mod in months that had my beta testers all complaining loudly.
It seems that a new function get_name() was recently added which is what was needed to get the address book name. This seems redundant and not needed and breaks many plugins. However the fix is not too difficult once one knows about the new get_name() function.
Are there any other new functions that I should be aware of that may be causing the problem of dragging from one address book to another?
comment:9 in reply to: ↑ 8 Changed 2 years ago by alec
Replying to deltatech:
It seems that a new function get_name() was recently added which is what was needed to get the address book name. This seems redundant and not needed and breaks many plugins. However the fix is not too difficult once one knows about the new get_name() function.
It's not redundant, this way we don't need to call $RCMAIL->get_address_sources() to know the name of current address book.
Are there any other new functions that I should be aware of that may be causing the problem of dragging from one address book to another?
No new functions, however there were some changes in search() method.
comment:10 Changed 2 years ago by deltatech
All external addressbooks broke with that update. Can not delete, add, drag from one addressbook to another and I am sure there is more but not sure what all else yet. Three different plugins now fail.
It appears that the plugins are reacting to actions taken on other address books and they don't know one book from another anymore.
For example, when attempting to delete a contact from any addressbook, my google_contacts plugin throws an error because the data being passed to the contact_delete routine changed. This use to work but now, $a is no longer an array
function contact_delete($a){
if($a['source'] == $this->abook_id){
$idlist = explode(',',$a['id']);
foreach( $idlist as $id ) {
$this->delete_contact($id);
}
$a['abort'] = false;
}
return $a;
}
comment:11 Changed 2 years ago by deltatech
Actually, this mod breaks even the default addressbook even with all addressbook plugins removed. Can't create new contacts nor edit existing. I get this error message in the logs..
Call to a member function validate() on a non-object in /var/www/vhosts/demo1234.org/httpdocs/roundcubemail/program/steps/addressbook/save.inc on line 138

I'm thinking about a simpler solution. We could display addressbook name in contact frame.