Re: (sitename)/help/admin (and other cached help pages) display old CFG_SITE_URL entries after inveniocfg --reset-sitename

2012-07-25 Thread Jerome Caffaro

Dear Theodoros,

On 07/25/2012 06:54 PM, Theodoros Theodoropoulos wrote:

Can I delete (or somehow re-generate) these cached semi-static
pages?


yes, you can simply get rid of the static cache files, as they would be
re-generated automatically when accessed (they are otherwise only
updated if the main source file has changed, which was not your case):

$ mv /opt/invenio/var/cache/webdoc/* /tmp/


I've updated invenio-local.conf file with the new value for
CFG_SITE_URL and  run  inveniocfg --reset-sitename (also tried
--update-all).


The cache files should ideally be updated/removed automatically
when CFG_SITE_NAME, CFG_SITE_URL, etc. are updated and 'inveniocfg'
is run. I will create a ticket to change this (in addition we might also
want to use relative URLs in help pages, to stick with user preference
to use http or https) and update the related HOWTO guide at:


(note that you refer to sitename for CFG_SITE_URL, while sitename would
rather apply to CFG_SITE_NAME and CFG_SITE_NAME_INTL*, Just wanted to
point that out, as 'inveniocfg --reset-sitename' will account for site
name change, not URL change)

Best regards
--
Jerome Caffaro


(sitename)/help/admin (and other cached help pages) display old CFG_SITE_URL entries after inveniocfg --reset-sitename

2012-07-25 Thread Theodoros Theodoropoulos

Hello everyone,

I've created a demo site/loaded demo records etc and then decided to 
move everything to a new server.
I've updated invenio-local.conf file with the new value for CFG_SITE_URL 
and  run  inveniocfg --reset-sitename (also tried --update-all).


Almost everything worked perfectly, however in $CFG_SITE_URL/help/admin 
some of the URLs still show the old URL. More specifically all the rows 
in the "Admin interface" column show the old URL, while all the rest 
URLs have been updated successfully.


From what i see in the invenio/admin/admin.webdoc file, the source of 
this behavior is the different treatment of the two columns. See a 
snippet of the code:


  WebSubmit 
Admin Interface



  WebSubmit Admin Guide


The second href displays properly the new sitename, while the first 
shows the old sitename.


Needless to say that config.py is correctly updated with the new value, 
apache was restarted (several times) and webcoll was run for the whole site.
The same happens also in some other help pages 
($CFG_SITE_URL/help/submit-guide for instance).
FYI, the DB has almost no reference of the old sitename (with the 
exception of the URLs in the 856 tag in the demo submissions, but this 
is normal).


In the filesystem, the old sitename still exists in the 
/opt/invenio/var/cache/[...] pages
The admin page 
(/opt/invenio/var/cache/webdoc/admin-pages/admin/admin.body-en.html) is 
one of the cached pages, which explains the output i get.


Can I delete (or somehow re-generate) these cached semi-static pages?

Best regards,
Theodoros


Re: websubmit_dump script?

2012-07-25 Thread Theodoros Theodoropoulos

Thank you Jerome for the file and the warnings/recommendations.

I'm playing with the various parameters, and it will definitely save me 
a lot of work!


Cheers,
Theodoros

ps. BTW, i'm thinking of transferring ALL the custom elements 
(sbmFIELDDESC table) and custom functions (sbmFUNDESC table) from the 
old system to the test, BEFORE copying the doctype details. This will 
probably require stripping of the relevant lines that are produced from 
the dump script, but since elements and functions are not directly 
connected to a certain doctype i fear that i will get errors if several 
doctypes try to insert them several times. I will try and see how it 
behaves.
For the other doctype-related tables you have very cleverly implemented 
a "delete from XXX where docname='ZZZ'" kind of functionality that will 
work if importing the same doctype over an existing one.