[EP-tech] Re: generate_views - no list pages...

Nick Wallingford nickw at beekeeping.co.nz
Thu Jun 19 08:43:05 BST 2014


Greetings, Yuri

My views.pl is unchanged from the fresh install...



===============


# Browse views. allow_null indicates that no value set is
# a valid result.
# Multiple fields may be specified for one view, but avoid
# subject or allowing null in this case.
$c->{browse_views} = [
         {
                 id => "year",
                 menus => [
			{
				fields => [ "date;res=year" ],
				reverse_order => 1,
                 		allow_null => 1,
				new_column_at => [10,10],
			}
		],
                 order => "creators_name/title",
		variations => [
			"creators_name;first_letter",
			"type",
			"DEFAULT" ],
         },
         {
                 id => "subjects",
                 menus => [
			{
				fields => [ "subjects" ],
                 		hideempty => 1,
			}
		],
                 order => "creators_name/title",
                 include => 1,
		variations => [
			"creators_name;first_letter",
			"type",
		],
         },
         {
                 id => "divisions",
                 menus => [
			{
				fields => [ "divisions" ],
                 		hideempty => 1,
			},
			{
				fields => [ "date;res=year" ],
				reverse_order => 1,
                 		allow_null => 1,
                 		hideempty => 1,
			},
		],
                 order => "creators_name/title",
                 include => 1,
		variations => [
			"creators_name;first_letter",
			"type",
			"DEFAULT",
		],
         },
         {
		id => "creators",
		allow_null => 0,
		hideempty => 1,
		menus => [
			{
				fields => [ "creators_name" ],
				new_column_at => [1, 1],
				mode => "sections",
				open_first_section => 1,
				group_range_function => "EPrints::Update::Views::cluster_ranges_30",
				grouping_function => "EPrints::Update::Views::group_by_a_to_z",
			},
		],
		order => "-date/title",
		variations => [
			"type",
			"DEFAULT",
		],
         },
];

# examples of some other useful views you might want to add
#
# Browse by the ID's of creators & editors (CV Pages). Useful to import the
# .include part into your main website or their homepage, rather than access
# directly via the eprints website.
#        {
#                id => "person",
#                menus => [
#			{
#				fields => [ "creators_id","editors_id" ],
#                		allow_null => 0,
#			}
#		],
#                order => "-date/title",
#                noindex => 1,
#                nolink => 1,
#                nocount => 0,
#                include => 1,
#        },

# Browse by the names of creators (less reliable than Id's), section the 
menu
# by the first 3 characters of the surname, and if there are more than 30
# names, split the menu up into sub-pages of around 30.
# Show the list of names in 3 columns.
#
#
#	{
#		id => "people",
#		menus => [
#			{
#				fields => ["creators_name","editors_name"],
#				allow_null => 0,
#				grouping_function => "EPrints::Update::Views::group_by_3_characters",
#				group_range_function => "EPrints::Update::Views::cluster_ranges_30",
#				mode => "sections",
#				open_first_section => 1,
#				new_column_at => [0,0],
#			}
#		],
#		order=>"title",
#	},


# Browse by the type of eprint (poster, report etc).
#{ id=>"type", menus=>[ { fields=>"type" } ], order=>"-date" }





===============

On 19/06/14 18:30, Yuri wrote:
> can you post your views.pl config?
>
> Il 19/06/2014 00:30, Nick Wallingford ha scritto:
>> OK, I've got the Ubuntu nicely running 14.04, and using eprints 3.3.12
>>
>> I'd done the misc. apache 2.4 patches to sort out the errors/warnings as
>> suggested in http://www.eprints.org/tech.php/thread-19050.html
>>
>> Re-generated views appears to be OK.  Restart apache.
>>
>> But still, the sub-pages such as /view/year/2005.html show as 404 - not
>> being dynamically built when requested, from what I read from John below.
>>
>> No clues from the apache access or error logs (apart from error.log
>> reporting that "script
>> '/usr/share/eprints3/archives/test/html/en/view/year/2005.html' not
>> found or unable to stat, referer: http://research.i.ac.nz/view/year/"
>>
>> In the year folder, index.html gets generated and written to disk with
>> generate_views, but 2005.html does not (as it is created 'on the fly'?)
>>     But I note that though there is an (empty) index.template file, there
>> is no 2005.template file.  Should there necessarily be?
>>
>> I'm thinking there must be some 'enabling' that I need to do for those
>> views before the sub-pages will generate as they should?  But
>> (obviously) new to the application, too!
>>
>> Nick Wallingford
>> Tauranga, NZ
>>
>>
>>
>>
>> On 16/06/14 21:07, John Salter wrote:
>>> Glad you're enjoying your experiences so far!
>>>
>>> If your version of Ubuntu shipped with Apache 2.4, this will be useful: http://www.eprints.org/tech.php/thread-19050.html
>>> If you have any other questions, you know where to ask!
>>>
>>> Cheers,
>>> John
>>>
>>> -----Original Message-----
>>> From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Nick Wallingford
>>> Sent: 16 June 2014 09:38
>>> To: eprints-tech at ecs.soton.ac.uk
>>> Subject: [EP-tech] Re: generate_views - no list pages...
>>>
>>> Thank you for that, John...
>>>
>>> I wasn't aware the .html (such as your 2013.html) was glued together
>>> when requested - I'd assumed they were built (static) in the same was as
>>> the index.html files.
>>>
>>> So I seem to have all the same sort of files as you - but still getting
>>> the 404.
>>>
>>> Error logs for apache 'point' at what would be the .html, in that same
>>> directory, but can't find it:
>>>
>>> script '/usr/share/eprints3/archives/test/html/en/view/year/2005.html'
>>> not found or unable to stat, referer: http://research.i.ac.nz/view/year/
>>>
>>> I've got some updating of the server to do tomorrow, so may wait until
>>> that is all stabilised before worrying with it much more...
>>>
>>> So far, certainly enjoying eprints - a very mature product with most all
>>> of the features my polytechnic is looking for, I think...
>>>
>>> Nick Wallingfordubuntu zombie processes	
>>> Tauranga, NZ
>>>
>>>
>>> On 16/06/14 19:35, John Salter wrote:
>>>> Hi Nick,
>>>> Have you created any of these views since last restarting Apache (if so, do a restart and check again)?
>>>>
>>>> I think the lack of the '.html' pages is normal - they are glued together with the template when requested.
>>>> In our ~/archives/ARCHIVEID/html/en/view/year directory, we have (for 2013):
>>>> 2013.default.export
>>>> 2013.default.include
>>>> 2013.default.page
>>>> 2013.default.title
>>>> 2013.default.title.textonly
>>>> 2013.export
>>>> 2013.include
>>>> 2013.page
>>>> 2013.title
>>>> 2013.title.textonly
>>>> 2013.type.export
>>>> 2013.type.include
>>>> 2013.type.page
>>>> 2013.type.title
>>>> 2013.type.title.textonly
>>>>
>>>> If that doesn't help, look in the Apache access/error logs and see if the path reported for the 404 response matches where the files live on disk.
>>>>
>>>> Cheers,
>>>> John
>>>>
>>>> -----Original Message-----
>>>> From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Nick Wallingford
>>>> Sent: 16 June 2014 05:31
>>>> To: eprints-tech at ecs.soton.ac.uk
>>>> Subject: [EP-tech] generate_views - no list pages...
>>>>
>>>> Hi
>>>>
>>>> New to the list, and to eprints.  I've spent time over the weekend
>>>> getting to know the structure of the application, so have a fair idea of
>>>> how things are working, but have hit a 'wall'.
>>>>
>>>> When I use generate_views <rep name> it does create the various
>>>> index.html pages for creators, divisions, subjects, years - as it should.
>>>>
>>>> It creates the 'precursor' pages for the specific lists, such as
>>>> *.export, *.include, *.page, *.title, *.title.textonly - but it doesn't
>>>> make the resulting *.html files.
>>>>
>>>> In the year folder, for instance, I have all of those for the (one year)
>>>> I have in the database: 2005 (as well as equivalent pages for
>>>> 2005.default and 2005.type - but the only .html file in that folder is
>>>> the index.html
>>>>
>>>> When you click, you just get the 404...
>>>>
>>>> Am I missing something pretty obvious here?  As it getting to the
>>>> immediate step before, I thought maybe permissions?  But can't see
>>>> anything odd there - and it *is* creating the index.html, so can't see
>>>> that could be it.
>>>>
>>>> But maybe someone can put me on the right track!
>>>>
>>>> EPrints Release: 3.3.12
>>>> Database Driver: EPrints::Database::mysql [DBI 1.609, DBD::mysql 4.012]
>>>> Database Server Version: MySQL 5.1.41-3ubuntu12.10-log
>>>>
>>>> The underlying Ubuntu is several steps old, but can't see that as
>>>> significant?
>>>>
>>>> Thanks...
>>>>
>>>> Nick Wallingford
>>>> Tauranga, NZ
>>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** Archive: http://www.eprints.org/tech.php/
>>>> *** EPrints community wiki: http://wiki.eprints.org/
>>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>>
>>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** Archive: http://www.eprints.org/tech.php/
>>>> *** EPrints community wiki: http://wiki.eprints.org/
>>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>>
>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>
>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive: http://www.eprints.org/tech.php/
>> *** EPrints community wiki: http://wiki.eprints.org/
>> *** EPrints developers Forum: http://forum.eprints.org/
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
>


More information about the Eprints-tech mailing list