Thread: SQL editor view, Add favourite disabled

SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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.

Any suggestions to fix or investigate would be most welcome.

Thanks.

Best,
Marc



Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
> 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.
> 
> Any suggestions to fix or investigate would be most welcome.

Bah! Should have added that I'm on Ubuntu 12.04, v1.16.1.

I'm using:
 deb http://ppa.launchpad.net/rhonda/pgadmin3/ubuntu oneiric main

Cheers,
Marc




Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
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.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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.

-- 
Best,
Marc




Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
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.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




Re: SQL editor view, Add favourite disabled

From
Michael Shapiro
Date:
Maybe he doesn't have a Favourites file path set in the Query Tool options?


On Tue, Jun 18, 2013 at 4:12 PM, Guillaume Lelarge <guillaume@lelarge.info> 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.


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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.

-- 
Best,
Marc




Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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.

-- 
Best,
Marc




Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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!".

So, I opened Options, navigated to Query Tool/Favourites, which has the
entry: "/home/marc/.pgadminfavourites"

Sure enough, this files doesn't exist. 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!".

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.

-- 
Best,
Marc




Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
On Tue, 2013-06-18 at 16:54 -0500, Michael Shapiro wrote:
> Maybe he doesn't have a Favourites file path set in the Query Tool options?
> 

That was an interesting thought, but even without a favourites file
path, the menu is still enabled. It fails later though.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




Re: SQL editor view, Add favourite disabled

From
Michael Shapiro
Date:
One more thought. Is he on a file-system that imposes additional access control. /afs does this, for example.<br /><br
/><divclass="gmail_quote">On Wed, Jun 19, 2013 at 12:03 PM, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info"target="_blank">guillaume@lelarge.info</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2013-06-18 at 16:54
-0500,Michael Shapiro wrote:<br /> > Maybe he doesn't have a Favourites file path set in the Query Tool options?<br
/>><br /><br /> That was an interesting thought, but even without a favourites file<br /> path, the menu is still
enabled.It fails later though.<br /><span class="HOEnZb"><font color="#888888"><br /><br /> --<br /> Guillaume<br /><a
href="http://blog.guillaume.lelarge.info"target="_blank">http://blog.guillaume.lelarge.info</a><br /><a
href="http://www.dalibo.com"target="_blank">http://www.dalibo.com</a><br /><br /></font></span></blockquote></div><br
/>

Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
On Wed, 2013-06-19 at 12:20 -0500, Michael Shapiro wrote:
> One more thought. Is he on a file-system that imposes additional access
> control. /afs does this, for example.
> 

That's one possibility. The other one is that his libxml is buggy.

> On Wed, Jun 19, 2013 at 12:03 PM, Guillaume Lelarge
> <guillaume@lelarge.info>wrote:
> 
> > On Tue, 2013-06-18 at 16:54 -0500, Michael Shapiro wrote:
> > > Maybe he doesn't have a Favourites file path set in the Query Tool
> > options?
> > >
> >
> > That was an interesting thought, but even without a favourites file
> > path, the menu is still enabled. It fails later though.
> >

This is fixed.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
On 19/06/13 18:20, Michael Shapiro wrote:
> One more thought. Is he on a file-system that imposes additional access
> control. /afs does this, for example.

I'm using a standard Ubuntu install on ext3. The home partition is
encrypted, but I doubt that's an issue (like it can be with nfs, for
example).

> On Wed, Jun 19, 2013 at 12:03 PM, Guillaume Lelarge
> <guillaume@lelarge.info <mailto:guillaume@lelarge.info>> wrote:
> 
>     On Tue, 2013-06-18 at 16:54 -0500, Michael Shapiro wrote:
>     > Maybe he doesn't have a Favourites file path set in the Query Tool
>     options?
>     >
> 
>     That was an interesting thought, but even without a favourites file
>     path, the menu is still enabled. It fails later though.
> 
> 
>     --
>     Guillaume
>     http://blog.guillaume.lelarge.info
>     http://www.dalibo.com
> 
> 




Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
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?

> 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.

>  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.

> 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.


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

Attachment

Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
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



Re: SQL editor view, Add favourite disabled

From
Guillaume Lelarge
Date:
On Wed, 2013-06-19 at 18:44 +0100, Marc Cooper wrote:
> 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.
> 

To be honest, I have no idea why.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com




Re: SQL editor view, Add favourite disabled

From
Marc Cooper
Date:
On 19/06/13 19:29, Guillaume Lelarge wrote:

> To be honest, I have no idea why.

Ok. Thanks very much for your ideas and for your time. It's very much
appreciated.

Ultimately, it's not a deal breaker for me. Other than the mild
annoyance of knowing it is broken, I felt duty bound to report it and
help debug it, in case it happens to others. At worst, I can manually
edit the favourites' files.

If any ideas do pop into your head to test, just ping me and I'm happy
to assist. Likewise, I'll report back if I find a fix, or an update
makes it work again.

Regardless, I really like pgadmin. It's a great tool that I'd be lost
without.

Thanks again.
Best,
Marc