EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03289


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Browse view by document language.


Hi Jacob,

OK - "documents.language" should work in a search configuration (on EPrints 3.3+) but perhaps this doesn't work for "views".

One reason this may not work is conceptual (and this complements Alan's reply): you are rendering a list of "EPrint" objects but "documents.language" is a switch/field on the "Document" objects. Since there's a 1-to-n relationships between EPrint and Document objects, the software will be confused as to how to render the alternative languages (since the alternative languages are, in fact, part of the same EPrint object).

Is it that you want to only show the documents in Danish on your "view"?

Seb


On 17/07/14 14:45, Jacob Wenzel wrote:
Thank you for clearing that out. I also tried "documents.language", but it produced the same error.

But why don't you think it will work? Not that I would be likely to understand a complicated explanation, but I would really love to have that option on my repository.

If it is indeed impossible, do I have any other options for letting my visitors sort the documents without searching.

I'm not keen on making a full translation of EPrints into Danish, and furthermore most Danes speak English as well, so I wouldn't want hide the English documents from my Danish visitors, just let them be able to sort them.

Thank you both for your feedback!

On 17-07-2014 15:23, Sebastien Francois wrote:
John was close, but it's "documents" (now I'm not sure what you're trying to achieve will work)

Seb

On 17/07/14 11:36, Jacob Wenzel wrote:
Thanks for your reply, but I actually that was one of the few other options I already tried.

It produces a slightly different error, but still no view list.

Error:
------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
Dataset eprint does not have a field 'document'
------------------------------------------------------------------
EPrints System Error inducing stack dump
 at /usr/share/eprints3/bin/../perl_lib/EPrints.pm line 146
        EPrints::abort() called at /usr/share/eprints3/bin/../perl_lib/EPrints/Utils.pm line 674
        EPrints::Utils::field_from_config_string('EPrints::DataSet=HASH(0x37d5a58)', 'document.language') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2137
        EPrints::Update::Views::menus_fields('EPrints::Update::Views=HASH(0x33049a0)') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2053
        EPrints::Update::Views::fieldlist_sizes('EPrints::Update::Views=HASH(0x33049a0)', 'ARRAY(0x6213ea0)', 0) called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2238
        EPrints::Update::Views::update_view_by_path('EPrints::Update::Views=HASH(0x33049a0)', 'on_write', 'CODE(0x33046d0)', 'langid', 'en', 'do_menus', 1, 'do_lists', 1, ...) called at bin/generate_views line 204




*** 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/