Forum OpenACS Q&A: Abstract URL's

Collapse
Posted by Grant Schofield on
After much trouble-shooting, it appears that the majority of problems we are having are as a result of abstract URL's, i.e. not recognising the url 'manage-portal' because it isn't specified as 'manage-portal.tcl'.

The system we are using is the following:

  • AolServer 3 beta6
  • PostgreSQL 7 beta3
  • ACS/pg 3.2.2 beta3
  • SuSE Linux 6.3/4
Does anybody have any ideas why abstract URL's aren't being recognised? Does this have something to do with the initialisation files, i.e. do we need to create a new
/parameters/${server}/ad.tcl

Any help would be greatly appreciated...

Collapse
2: Response to Abstract URL's (response to 1)
Posted by Grant Schofield on
Oops..

I went through all the posts on the forum one by one and tried every solution mentioned regarding the initialisation files and the auxconfigdir. I now have a fully functional ACS/pg!!(apart from some small tweaks - hopefully)

The solution that worked was to use a nsd.tcl file and to add the line

source /web/${server}/parameters/gacs.tcl
Not only is the system working, but now both initialisation files are .tcl, which is where we were aiming....
Collapse
3: Response to Abstract URL's (response to 1)
Posted by Jerry Adlersfluegel on
My OpenACS is working, but the abstract URLs aren't. From my openacs.tcl config file:
        # stuff having to do with abstract urls (doc/abstract-url.html)

ns_section ns/server/${servername}/acs/abstract-url

        # enable abstract url handling?
        ns_param EnableAbstractURLsP 1
This causes all sorts of breakage. Any tips on how to get that working? Thanks.
Collapse
4: Response to Abstract URL's (response to 1)
Posted by Grant Schofield on
Jerry,

We couldn't get the abstract URL's to work either. I took Ben's advice and made sure that both configuration files were .tcl's, and that the /parameters/$(servername).tcl was the most current version. This solved all our problems with abstract URL's...

Collapse
5: Response to Abstract URL's (response to 1)
Posted by Jerry Adlersfluegel on
Grant,

Both of my config files are .tcl, and I have the current ones that Roberto Mello recommended in the configuration walkthrough? question.

I just diffed my $(servername).tcl against the CVS at sourceforge, and my file looks good.

I'm not sure where to look next.

Collapse
6: Response to Abstract URL's (response to 1)
Posted by Roberto Mello on
Can you post the errors in your log file for when you turn on abstract url's ?
Collapse
7: Response to Abstract URL's (response to 1)
Posted by Jerry Adlersfluegel on
I assume that by turning on abstract URLs you mean having ns_param EnableAbstractURLsP 1 in $(hostname).tcl.

Here's what shows up in ~nsadmin/log/server.log when I hit, for example, http://bender/doc/file-storage

[01/Jun/2000:15:08:21][9644.648197][-conn30-] Notice: Querying 'select * from referer_log_glob_patterns;'
[01/Jun/2000:15:08:21][9644.648197][-conn30-] Notice: nsd.db: sql(localhost::bender):  select * from referer_log_glob_patterns
[01/Jun/2000:15:08:21][9644.648197][-conn30-] Notice: Querying 'update referer_log set click_count = click_count + 1
where local_url = '/doc/file-storage' 
and foreign_url = 'http://bender/admin/file-storage/'
and trunc(entry_date) = trunc(sysdate());'
[01/Jun/2000:15:08:21][9644.648197][-conn30-] Notice: nsd.db: sql(localhost::bender):  update referer_log set click_count = click_count + 1
where local_url = '/doc/file-storage' 
and foreign_url = 'http://bender/admin/file-storage/'
and trunc(entry_date) = trunc(sysdate())
If that isn't what you meant, let me know.
Collapse
8: Response to Abstract URL's (response to 1)
Posted by Roberto Mello on
Yes, that's what I meant, but I don't see any errors in your logs. Your logs are showing OpenACS recording the visit to that page in a table in the DB.

Exactly what is breaking ? Was the page served right ? Try to be more specific please.

Collapse
9: Response to Abstract URL's (response to 1)
Posted by Jerry Adlersfluegel on
Right, sorry. Loading the url above gives the "Not Found - The requested URL was not found on this server." page. But the only thing written to the log file is what I listed above. If I add the .html to the URL it loads fine.
Collapse
Posted by Jerry Adlersfluegel on
For the record:

After upgrading to 3.2.2 final, my abstract URLs work as they should.

Collapse
Posted by Andrei Popov on
Just for your information, these are not working unless the following little change is made in ad-abstract-url.tcl in procedure ad_get_true_file_path:

Change

regsub -all {[^0-9a-zA-Z_/.]} $path {&} path_glob

into

regsub -all {[^0-9a-zA-Z_/.:]} $path {&} path_glob

The problem is that the above regsub prepends all characters other than alpha-num, "_", "/" and "." with a back-slash: . This way "d:/AOLserver/servers/server1/www/index" becomes "d:/AOLserver/servers/server1/www/index". Needless to say that the following call to check existence of a file in the filesystem fails.

Collapse
Posted by Don Baccus on
It doesn't look like you've submitted this patch to the SDM, is that right? (I just tried searching for "abstract" in my browser window list of bugs).  If so, could you please submit it and the patch?  We'll make sure it gets into 3.2.6 if you do.
Collapse
Posted by Andrei Popov on
Patch has been posted into SDM under #15.