Re: SQL editor view, Add favourite disabled - Mailing list pgadmin-support

From Marc Cooper
Subject Re: SQL editor view, Add favourite disabled
Date
Msg-id 51C1EDE2.4010705@auxbuss.com
Whole thread Raw
In response to Re: SQL editor view, Add favourite disabled  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: SQL editor view, Add favourite disabled
List pgadmin-support
On 19/06/13 18:33, Guillaume Lelarge wrote:
> On Wed, 2013-06-19 at 10:39 +0100, Marc Cooper wrote:
>> On 18/06/13 22:33, Guillaume Lelarge wrote:
>>> On Tue, 2013-06-18 at 22:19 +0100, Marc Cooper wrote:
>>>> On 18/06/13 22:12, Guillaume Lelarge wrote:
>>>>> On Fri, 2013-06-14 at 19:32 +0100, Marc Cooper wrote:
>>>>>> Hi,
>>>>>>
>>>>>> When in the SQL editor, I can no longer add queries to my favourites.
>>>>>>
>>>>>> I have added entries in the past, and I can see these and access them,
>>>>>> but I can no longer add new entries as the menu item "Add favourite..."
>>>>>> is greyed out and disabled.
>>>>>>
>>>>>
>>>>> It's disabled if you have no text in the query textbox. AFAICT, that's
>>>>> the only reason explaining why it is disabled.
>>>>
>>>> Well, clearly I have a query that I'm trying to save.
>>>>
>>>> The problem is that the "Add favourite..." never becomes available.
>>>>
>>>> Is there somewhere I can report a bug? There doesn't appear to be
>>>> anywhere on github, as far as I can see.
>>>>
>>>
>>> This is where you report a bug. Unfortunately, without having a way to
>>> reproduce your bug, a report won't get you anywhere.
>>
>> Ok. I purged pgadmin, located any remaining files and directories
>> containing the string pgadmin, and reinstalled pgadmin.
>>
>> I added a server, opened a database, and opened the query tool. This
>> opened a modal window that says, "Failed to read favourites file!".
>>
> 
> Sounds wrong. It works for me with no file. What is the version of your
> libxml library?

From the package meta: 2.7.8.dfsg-5.1ubuntu4.4

>> So, I opened Options, navigated to Query Tool/Favourites, which has the
>> entry: "/home/marc/.pgadminfavourites"
>>
>> Sure enough, this files doesn't exist.
> 
> Be careful. It says that it cannot read it. Not that it cannot find it.

Sure. But it can't read it when it when it's not there :-/ However, as
I mentioned before, some time in the past I was able to write to it, so
I have a readable version available.

>>  So, I did:
>>  $ touch /home/marc/.pgadminfavourites
>>  $ chmod 664 /home/marc/.pgadminfavourites
>>
>> Then I restarted pgadmin.
>>
>> Following the same steps as above, the same modal window with the same
>> message appears: "Failed to read favourites file!".
>>
> 
> Sure, it expects to find an XML document in it. It cannot parse an empty
> file.

Fair enough.

>> Clearly, the file now exists. Indeed, Options/Query Tool/Favourites has
>> it selected.
>>
>> In addition, in ~/.pgadmin3, this line appears:
>>
>>   FavouritesFile=/home/marc/.pgadminfavourites
>>
>> Here are the pgadmin config files thus far:
>>
>> $ ls -la .pgadmin*
>> -rw-rw-r-- 1 marc marc 5485 Jun 19 10:27 .pgadmin3
>> -rw-rw-r-- 1 marc marc    0 Jun 19 10:26 .pgadminfavourites
>> -rw-rw-r-- 1 marc marc  117 Jun 19 10:14 .pgadmin_histoqueries
>>
>> Any ideas? Thanks.
>>
> 
> Try the file attached. It works for me.

Yes, this is readable. I can load the queries and open Manage Queries.
But "Add favourite" is still greyed out, sadly.

Marc



pgadmin-support by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: (Bug) Numeric fault calculation
Next
From: Guillaume Lelarge
Date:
Subject: Re: SQL editor view, Add favourite disabled