Gossamer Forum
Home : Products : Gossamer Links : Discussions :

static pages and build related queries

Quote Reply
static pages and build related queries
Three qstns:

(1). Static Pages (Build All)if used for login, does always show the links after login as if the user is not logged in. For example, EDITORS/LOGOUT Never appears if logging in from the static pages (Build thru Build All). Does it mean that the href for "Home" has to be changed to <%db_cgi_url%>/page.cgi?d=1

(2). Upon removing categories/ subcategories and then doing a Build All leaves the statically built pages in the directory (though not visible to visitor) which would really mean that once the directory grows, it really becomes a cumbersome job to reconcile the Statically Built Directories (and pages therein) and the ones actually threre in the database. This is despite the fact that the permissions were as desired during the initial installation.

Why aren't the redundant directories (and pages therein) being removed? What needs to be done to ensure that the database and the static directories are actually in unison with each other.

(3). This is carried forward from a earlier thread. The error while trying to edit categories and sub categories. The admin cannot edit the same as it gives error which has already been highlighted many a times and found the same to be true in my case also.

Please note that I have not tested the same on Links as i would want to move a step at a time. Links would only be tested after the Category/Sub category editing error is resolved.

Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Regarding Point Number (3). JIC the following Debug log could help evaluate the cause. Basically, It's the same as with many others, where some Links are editedable and the others are not. In this case it is wrt cats and subcats.

Subcats Which Can Be Modified

GT::SQL::Driver::MYSQL::sth (22080): Executing query: SELECT * FROM lsql_Category WHERE ( ID = 47 ) from Links::Browser::category_modify_form at (eval 641) line 12
GT::SQL::Driver::MYSQL::sth (19841): Executing query: SELECT ID,FatherID,Full_Name,Name,Number_of_Links FROM lsql_Category WHERE ID = 47 from Links::Category::_plg_modify at /admin/Links/Category.pm line 180
GT::SQL::Driver::MYSQL::sth (19841): Executing query: SELECT Timestmp FROM lsql_Category WHERE ( ID = 47 AND Timestmp > 20040301015901 ) from Links::Category::_plg_modify at /admin/Links/Category.pm line 201
GT::SQL::Driver::MYSQL::sth (19841): Executing query: UPDATE lsql_Category SET Description = '' , Newest_Link = '0000-00-00' , Category_Template = '' , Meta_Description = '' , Name = 'Driving Schools' , Footer = '' , Header = '' , Has_New_Links = 'No' , Number_of_Links = 0 , Has_Changed_Links = 'No' , Full_Name = 'Automobiles/Driving Schools' , Meta_Keywords = '' , FatherID = 30 WHERE ID = 47 from Links::Category::_plg_modify at /admin/Links/Category.pm line 201
GT::SQL::Driver::MYSQL::sth (19841): Executing query:
SELECT lsql_Links.ID
FROM lsql_CatLinks, lsql_Links
WHERE lsql_CatLinks.LinkID = lsql_Links.ID AND (lsql_CatLinks.CategoryID = '47')
ORDER BY isValidated DESC, Title ASC LIMIT 0, 25
from Links::Browser::_links_list_html at /admin/Links/Browser.pm line 1419

Subcats Which Cannot Modified

GT::SQL::Driver::MYSQL::sth (19842): Executing query: SELECT * FROM lsql_Category WHERE ( ID = 33 ) from Links::Browser::category_modify_form at (eval 641) line 12
GT::SQL::Driver::MYSQL::sth (19842): Query execution took: 0.000941s from Links::Browser::category_modify_form at (eval 641) line 12
GT::SQL::Driver::MYSQL::sth (21673): Executing query: SELECT ID,FatherID,Full_Name,Name,Number_of_Links FROM lsql_Category WHERE ID = 33 from Links::Category::_plg_modify at /admin/Links/Category.pm line 180
GT::SQL::Driver::MYSQL::sth (21673): Executing query: SELECT Timestmp FROM lsql_Category WHERE ( ID = 33 AND Timestmp > 20040226121328 ) from Links::Category::_plg_modify at /admin/Links/Category.pm line 201
GT::SQL::Table (21673): The record you are attempting to modify has changed since you last accessed it. at /admin/Links/Category.pm line 201.
[Mon Mar 1 03:52:12 2004] [error] Invalid Request: '' 'category_modify' at /admin/admin.cgi line 65.

Please note that the full paths have been removed from the above and only /admin onwards are given. There are no Links in the DB.

Any Clue?

Anup

Last edited by:

anup123: Feb 29, 2004, 2:16 PM
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Continuing on with attempt to provide as much info as possible so that there could be some answer towards a fix to this problem, for all the cats/subcats which were giving the error i did the following:

Thru phpmyadmin, did nothing but clicked on edit and then saved. Continued with all the cats/sub cats which were giving the error.

Wow, the error goes away and the cat/subcats become editable. However, no sooner than a new cat/subcat is added that the error re-appears. I repeated the above steps and found the same to be reproducible. I am currently only working on cats/subcats with no links as i would want this often reported problem to be fixed before attempting to do testing with links.

Please note that I do not intend to use LSQL for the routine DMOZ directory replication (or even part of DMOZ for that matter). I am faced with this error (which incidentally does not seems to be an isolated case applicable to me) and almost four days down the line I am still at where i had started. And since it is a Paid Model, i wouldn't be daring to take the shortcut of releasing it with such bugs and errors.

Could the maestros throw some light or offer a solution to this problem please. I am waiting.

Anup

Last edited by:

anup123: Mar 1, 2004, 6:55 AM
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Just a general comment ... I am also not using DMOZ data and am not using LSQL in the typical links directory set-up. The only time I've had problems modifying any of the categories has been when I've double-clicked the submit button. The MySql server is making the record update far faster than my browser is updating the screen/page. A double-click results in the timestamp error message.
Quote Reply
Re: [Karen] static pages and build related queries In reply to
Thanks for your sharing your observations but i am sure i had mentioned that it is not the case with me. Don't tell me mouse, spacebar, 2 enter keys all could go bad only for LSQL. I think there are amny instances of such errors being reported and i am sure that GT would come up with something which would not let this error continue on for long.

If yr observations would be true in my case then by just saving the record once more thru phpmyadmin, the same record becomes editable thru the same mouse, spacebar, 2 enter keys. It's only when a new cat/subcat is added thru admin, that the error again reappears. Hope that clarifies my observations. LSQL would not be something like M$ software which would become so "Hardware Specific" that every record update would want a new keyboard and a mouse.

Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Right now, the only way to delete old dirs and files is to manually delete them. I believe that webmaster33 and Andy might be working on some site cleanup plugins, though.

------------------------------------------
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Hi,

1. No, this is because it is a static page, so it has no way of knowing if the user is logged in or not. You need to:

a. Use dynamic mode
b. Use an SSI (note: this means you are running a request per html page, so you lose the speed benefits of static pages)
c. Use cookies and javascript. Use some javascript to write out different html depending on if the user has a cookie set (can't tell if the cookie is valid).

2. This is by design. Links SQL has no way of knowing what was created by Links SQL and what was added by FTP or other scripts. Links SQL does not attempt to remove old directories (as also people often want them to maintain in search engines). If you want, you can simply delete the build root directory, and then run Build All again to get a fresh directory.

3. Can you run:

Code:
SELECT ID, Timestmp, Timestmp > 20040226121328 FROM lsql_Category WHERE ID = 33

and tell me what it outputs? I have seen an error like this before on misconfigured servers. If you're server is using an experimental timezone setting, MySQL is not able to compare dates properly.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [anup123] static pages and build related queries In reply to
In Reply To:
Thanks for your sharing your observations but i am sure i had mentioned that it is not the case with me. Don't tell me mouse, spacebar, 2 enter keys all could go bad only for LSQL. I think there are amny instances of such errors being reported and i am sure that GT would come up with something which would not let this error continue on for long.


Hello Anup, I wasn't saying anything was wrong with hardware - I sure couldn't manage to replace my mouse each time it begins getting touchy. What I did say is that I've only encountered that error message when I've accidentally double-clicked the submit ... and I verified the problem was at my end by using the Browse features and checking to see If the new cat/subcat was added (yes, it is) and using Edit in Browse to check that the fields are correct (yes, they are). Even without saving again (selecting another cat/subcat in Browse), the cat/subcat is there working and configured properly.



In Reply To:
If yr observations would be true in my case then by just saving the record once more thru phpmyadmin, the same record becomes editable thru the same mouse, spacebar, 2 enter keys. It's only when a new cat/subcat is added thru admin, that the error again reappears. Hope that clarifies my observations. LSQL would not be something like M$ software which would become so "Hardware Specific" that every record update would want a new keyboard and a mouse.

Anup


How did the new record become available to phpadmin for saving "again"? I believe you're describing the very same phenomenon I've described - an inadvertant double-click on the submit. The first writes in the record, the second produces a timestamp error because the form and (now existing) record time no longer match.

I didn't realize posting my observations would cause so much anxiety. Apologies.
Quote Reply
Re: [Alex] static pages and build related queries In reply to
Hi.

The query output:

mysql> SELECT ID, Timestmp, Timestmp > 20040226121328 FROM lsql_Category WHERE ID = 33;
+----+----------------+---------------------------+
| ID | Timestmp | Timestmp > 20040226121328 |
+----+----------------+---------------------------+
| 33 | 20040226121328 | 1 |
+----+----------------+---------------------------+
1 row in set (0.01 sec)


Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Hi,

It does indeed look like your server is not configured properly. Look at the output of that query, MySQL says Timestmp is '20040226121328', yet also considers Timestmp to be greater then '20040226121328', when in fact they are equal.

You need to update your server to use a normal timezone setting, and then restart MySQL. Most likely you have /etc/localtime set to something like /usr/share/zoneinfo/right/US/Pacific. The /right/ is meant to take into account leap seconds and isn't recommend for use by Redhat (labeled experimental, and is what is causing problems with MySQL which can't do date calculations with this timezone). You want to set /etc/localtime to say /usr/share/zoneinfo/US/Pacific.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] static pages and build related queries In reply to
Hi,

As of now, the date/time is set to

GMT+5:30 Bombay/New Delhi/Calcutta/Madras

/usr/share/zoneinfo/Asia

Is that incorrect/experimental?


Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Hi,

What does:

ls -al /etc/localtime

say?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] static pages and build related queries In reply to
Hi.

-rw-r--r-- 2 root root 285 Apr 23 2002 /etc/localtime

Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
Ah, I hate systems that don't symlink to the proper timezone. For instance, on our servers, you should see:

[root@gossamer root]# ls -la /etc/localtime
lrwxrwxrwx 1 root root 30 Jan 29 12:55 /etc/localtime -> /usr/share/zoneinfo/US/Pacific
[root@gossamer root]#

So you know which timezone it's using. With yours, you need to track down which file that is (as it was copied rather then linked). Try:

find /usr/share/zoneinfo -size 285c

which on my system shows you are using either:

/usr/share/zoneinfo/right/Asia/Calcutta
/usr/share/zoneinfo/right/Atlantic/Cape_Verde

Both of these are in the /right/ directory which is incorrect/experimental.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] static pages and build related queries In reply to
Hi.

Thnx. It is from /right/...
Would copying over from /user/zoneinfo/Asia/Calcutta be correct?

that size is 109

Anup
Quote Reply
Re: [anup123] static pages and build related queries In reply to
A better fix is to:

rm /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

Then restart MySQL and run the same query I mentioned above. It should say 0 for the greater then test.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] static pages and build related queries In reply to
Hi Alex.

Thanks. The error is gone. I can edit all the categories and sucats now. I am sure that there would be no error wrt links also.

Thanks once again

Anup
Quote Reply
Re: [DogTags] static pages and build related queries In reply to
Quote:
I believe that webmaster33 and Andy might be working on some site cleanup plugins, though.
Unfortunately not. Frown
I had plans to create such plugin, but I have no time for plugin developments because of my studies.
I'm phasing out my current custom jobs, then I'll likely not take new ones until I finish my studies this year.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [Alex] static pages and build related queries In reply to
hi folks! I have same problem but it couldn't be solved so easily as I'm on shared hosting and simply can't modify my localtime settings:( is there any other way to solve this? I would appreciate any help, thank you in advance!

Denis
------
Webmaster Key - Discussion Forums
Pharos Search - A Human Edited Directory
Quote Reply
Re: [Alex] static pages and build related queries In reply to
In Reply To:

c. Use cookies and javascript. Use some javascript to write out different html depending on if the user has a cookie set (can't tell if the cookie is valid).


This seems simple enough, although I don't javascript that well to develop something. Does anyone have something that they're using for this already?

Robert
http://www.pcprofiles.com
PC Profiles and hardware reviews