EPrints Technical Mailing List Archive

Message: #09308


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

[EP-tech] {Suspected SPAM} Re: {Suspected SPAM} Re: {Suspected SPAM} Re: {Suspected SPAM} Undefined or invalid function when add new dataset field

  • To: David R Newman <drn@ecs.soton.ac.uk>
  • Subject: [EP-tech] {Suspected SPAM} Re: {Suspected SPAM} Re: {Suspected SPAM} Re: {Suspected SPAM} Undefined or invalid function when add new dataset field
  • From: "MOHD.IZWAN SALIM" <mohdizwan8733@uitm.edu.my>
  • Date: Mon, 8 May 2023 08:29:29 +0800

CAUTION: This e-mail originated outside the University of Southampton.
Dear David, this is the entire log message

[Mon May 08 08:07:11.959163 2023] [:error] [pid 6281:tid 140292304901888] Usage: XML::LibXML::Node::appendChild(self, nNode) at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Component/Field.pm line 309.\n
Undefined or invalid function: indexed_by
 at /usr/share/eprints/perl_lib/EPrints/Repository.pm line 1853.
EPrints::Repository::call(EPrints::Repository=HASH(0x56420023c140), "indexed_by", EPrints::MetaField::Namedset=HASH(0x7f97f40adf10), EPrints::Repository=HASH(0x56420023c140), undef, EPrints::DataSet=HASH(0x7f98442cfd40), 0, undef, ...) called at /usr/share/eprints/perl_lib/EPrints/MetaField.pm line 1040
EPrints::MetaField::call_property(EPrints::MetaField::Namedset=HASH(0x7f97f40adf10), "render_input", EPrints::MetaField::Namedset=HASH(0x7f97f40adf10), EPrints::Repository=HASH(0x56420023c140), undef, EPrints::DataSet=HASH(0x7f98442cfd40), 0, undef, ...) called at /usr/share/eprints/perl_lib/EPrints/MetaField.pm line 514
EPrints::MetaField::render_input_field(EPrints::MetaField::Namedset=HASH(0x7f97f40adf10), EPrints::Repository=HASH(0x56420023c140), undef, EPrints::DataSet=HASH(0x7f98442cfd40), 0, undef, EPrints::DataObj::EPrint=HASH(0x7f98303006e8), "c17") called at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Component/Field.pm line 309
EPrints::Plugin::InputForm::Component::Field::render_content(EPrints::Plugin::InputForm::Component::Field=HASH(0x7f97f4028708), EPrints::Plugin::InputForm::Surround::Default=HASH(0x7f97f422a508)) called at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Surround/Default.pm line 78
EPrints::Plugin::InputForm::Surround::Default::render(EPrints::Plugin::InputForm::Surround::Default=HASH(0x7f97f422a508), EPrints::Plugin::InputForm::Component::Field=HASH(0x7f97f4028708), EPrints::Repository=HASH(0x56420023c140)) called at /usr/share/eprints/perl_lib/EPrints/Workflow/Stage.pm line 255
EPrints::Workflow::Stage::render(EPrints::Workflow::Stage=HASH(0x7f97f40765d8), EPrints::Repository=HASH(0x56420023c140), EPrints::Workflow=HASH(0x7f97f401cc50)) called at /usr/share/eprints/perl_lib/EPrints/Workflow.pm line 446
EPrints::Workflow::render(EPrints::Workflow=HASH(0x7f97f401cc50)) called at /usr/share/eprints/perl_lib/EPrints/Plugin/Screen/EPrint/Edit.pm line 291
EPrints::Plugin::Screen::EPrint::Edit::render(EPrints::Plugin::Screen::EPrint::Edit=HASH(0x7f97f401c908)) called at /usr/share/eprints/perl_lib/EPrints/ScreenProcessor.pm line 406
EPrints::ScreenProcessor::process("EPrints::ScreenProcessor", "session", EPrints::Repository=HASH(0x56420023c140), "template", undef, "url", "/cgi/users/home") called at /usr/share/eprints/cgi/users/home line 43
ModPerl::ROOT::ModPerl::Registry::usr_share_eprints_cgi_users_home::handler(Apache2::RequestRec=SCALAR(0x7f98300a6450)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 207
eval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 207
ModPerl::RegistryCooker::run(ModPerl::Registry=HASH(0x7f98300e9248)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 173
ModPerl::RegistryCooker::default_handler(ModPerl::Registry=HASH(0x7f98300e9248)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/Registry.pm line 32
ModPerl::Registry::handler("ModPerl::Registry", Apache2::RequestRec=SCALAR(0x7f98300a6450)) called at -e line 0
eval {...} called at -e line 0
[Mon May 08 08:07:12.810632 2023] [:error] [pid 6282:tid 140292330080000] Usage: XML::LibXML::Node::appendChild(self, nNode) at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Component/Field.pm line 309.\n

I checked this with other namedset fields, it was same. The database also already exists.

This is in the archives\articleindex\cfg\cfg.d\zz_webcfg_eprint_fields.pl

{
  'allow_null' => '1',
  'browse_link' => 'indexed_by',
  'export_as_xml' => '1',
  'input_boxes' => 3,
  'input_cols' => 60,
  'input_ordered' => '0',
  'input_rows' => 10,
  'input_style' => 'medium',
  'maxlength' => 255,
  'multiple' => '0',
  'name' => 'indexed_by',
  'provenance' => 'user',
  'render_input' => 'indexed_by',
  'render_value' => 'indexed_by',
  'required' => '1',
  'set_name' => 'indexed_by',
  'sql_index' => '0',
  'type' => 'namedset',
  'volatile' => '0'
}

Izwan
UiTM Digital Library


On Fri, May 5, 2023 at 5:50 PM David R Newman <drn@ecs.soton.ac.uk> wrote:

Hi Izwan,

The purpose of using a "Field::Subject" type component is that it will display the options in a subject tree format where you can click the add button next to the subject would want to choose.  This may make it easier to use that a select box, particular where you might want to select multiple options.  Using the "Field::Subject" type component will break for any type of field other than the "subject" type.  For "namedset" type field you should use a plain component:

<component>
  <field ref="YOUR_NAMEDSET_FIELD"/>
</component>

Although using "Manage Metadata Fields" via the web interface can cause some complications, you should be able to create at least basic versions of all types of field.  You do need to make sure you deploy the field, once you have finished configuring it.  You may also need to reload your repositories configuration using the "Reload Configuration"  and "Update Database" buttons in the "Config. Tools" tab of the Admin page.  However, I would normally expect that to occur as part of the action that deploys the new field you have configured.

It would be useful if you could provide the exact error message. "Undefined or invalid function" is a rather generic error and easy to cause with only minor configuration mistakes.

Regards

David Newman


On 05/05/2023 10:35, MOHD.IZWAN SALIM via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Does all metadata field need to add type like subject? - <component type="Field::Subject">

I just add another new one with type namedset but got Undefined or invalid function error in log.

I already create the file in the namedsets folder.

Btw, forgot to mention, I create the field from the web interface - /cgi/users/home?screen=MetaField::Listing&dataset=eprint#t

Regards

Izwan
UiTM Digital Library


On Wed, May 3, 2023 at 3:34 PM MOHD.IZWAN SALIM via Eprints-tech <eprints-tech@ecs.soton.ac.uk> wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Oh yeah, this work.

Thanks John.

I just need to edit the page phrases for the search form. I just copy it from subjects.

Thanks for replying me, John and David.


Izwan
UiTM Digital Library


On Wed, May 3, 2023 at 2:53 PM John Salter <J.Salter@leeds.ac.uk> wrote:
Hi,
Try this:
<component type="Field::Subject">
  <field ref="campuses" />
</component>
Sorry for a short reply - I'm on my phone!
Cheers,
John 


From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of David R Newman via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Sent: 03 May 2023 07:48
To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; MOHD.IZWAN SALIM <mohdizwan8733@uitm.edu.my>
Subject: Re: [EP-tech] {Suspected SPAM} Undefined or invalid function when add new dataset field
 
Hi Izwan,

You say that campuses is a new dataset but you have added the field as type 'subject'.  This is not going to work you probably want to use type 'dataobjref':

https://wiki.eprints.org/w/Dataobjref_field

If campuses are actually specified in your subjects tree then you could use a field of type 'subject'.  However, you would need to make sure you have section of you subject tree that contains all your campuses and then specify this parent subject's id this under the 'top' attribute of the subject typed field.

Regards

David Newman

On 03/05/2023 7:34 am, MOHD.IZWAN SALIM via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Dear all

Just add a new dataset - campuses to our repository. The type is subject. I already run epadmin update dan upgrade.

However, when I add <component><field ref="campuses" /></component> in our default page, it will show an error with the log indicated as below:

Undefined or invalid function: campuses
 at /usr/share/eprints/perl_lib/EPrints/Repository.pm line 1853.
EPrints::Repository::call(EPrints::Repository=HASH(0x55fdea222a10), "campuses", EPrints::MetaField::Subject=HASH(0x7f6588b7b730), EPrints::Repository=HASH(0x55fdea222a10), ARRAY(0x7f6588a872c8), EPrints::DataSet=HASH(0x7f65882d5130), 0, undef, ...) called at /usr/share/eprints/perl_lib/EPrints/MetaField.pm line 1040
EPrints::MetaField::call_property(EPrints::MetaField::Subject=HASH(0x7f6588b7b730), "render_input", EPrints::MetaField::Subject=HASH(0x7f6588b7b730), EPrints::Repository=HASH(0x55fdea222a10), ARRAY(0x7f6588a872c8), EPrints::DataSet=HASH(0x7f65882d5130), 0, undef, ...) called at /usr/share/eprints/perl_lib/EPrints/MetaField.pm line 514
EPrints::MetaField::render_input_field(EPrints::MetaField::Subject=HASH(0x7f6588b7b730), EPrints::Repository=HASH(0x55fdea222a10), ARRAY(0x7f6588a872c8), EPrints::DataSet=HASH(0x7f65882d5130), 0, undef, EPrints::DataObj::EPrint=HASH(0x7f658899c5d0), "c16") called at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Component/Field.pm line 309
EPrints::Plugin::InputForm::Component::Field::render_content(EPrints::Plugin::InputForm::Component::Field=HASH(0x7f6588b78040), EPrints::Plugin::InputForm::Surround::Default=HASH(0x7f6588b645e0)) called at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Surround/Default.pm line 78
EPrints::Plugin::InputForm::Surround::Default::render(EPrints::Plugin::InputForm::Surround::Default=HASH(0x7f6588b645e0), EPrints::Plugin::InputForm::Component::Field=HASH(0x7f6588b78040), EPrints::Repository=HASH(0x55fdea222a10)) called at /usr/share/eprints/perl_lib/EPrints/Workflow/Stage.pm line 255
EPrints::Workflow::Stage::render(EPrints::Workflow::Stage=HASH(0x7f6588af2748), EPrints::Repository=HASH(0x55fdea222a10), EPrints::Workflow=HASH(0x7f6588aeec38)) called at /usr/share/eprints/perl_lib/EPrints/Workflow.pm line 446
EPrints::Workflow::render(EPrints::Workflow=HASH(0x7f6588aeec38)) called at /usr/share/eprints/perl_lib/EPrints/Plugin/Screen/EPrint/Edit.pm line 291
EPrints::Plugin::Screen::EPrint::Edit::render(EPrints::Plugin::Screen::EPrint::Edit=HASH(0x7f6588af07f8)) called at /usr/share/eprints/perl_lib/EPrints/ScreenProcessor.pm line 406
EPrints::ScreenProcessor::process("EPrints::ScreenProcessor", "session", EPrints::Repository=HASH(0x55fdea222a10), "template", undef, "url", "/cgi/users/home") called at /usr/share/eprints/cgi/users/home line 43
ModPerl::ROOT::ModPerl::Registry::usr_share_eprints_cgi_users_home::handler(Apache2::RequestRec=SCALAR(0x7f6588a281c8)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 207
eval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 207
ModPerl::RegistryCooker::run(ModPerl::Registry=HASH(0x7f6588a49ba0)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/RegistryCooker.pm line 173
ModPerl::RegistryCooker::default_handler(ModPerl::Registry=HASH(0x7f6588a49ba0)) called at /usr/lib/x86_64-linux-gnu/perl5/5.26/ModPerl/Registry.pm line 32
ModPerl::Registry::handler("ModPerl::Registry", Apache2::RequestRec=SCALAR(0x7f6588a281c8)) called at -e line 0
eval {...} called at -e line 0
[Wed May 03 14:19:07.799136 2023] [:error] [pid 3830:tid 140073899120384] Usage: XML::LibXML::Node::appendChild(self, nNode) at /usr/share/eprints/perl_lib/EPrints/Plugin/InputForm/Component/Field.pm line 309.\n

Am I missing something?

Regards

Izwan
UiTM Digital Library

PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...

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


PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...
*** 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/

PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...

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

PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...