Custom Vocab troubles

Hi, anybody knows why i cant create drop down menu and see inline terms?
this 3 terms shows inline and in fact are 1 term

Screenshot_2

Can you let us know which versions of Omeka S and Custom Vocab you are using?

Omeka S Version 3.0.1
Custom Vocab version 1.3.0

I can’t replicate the issue - does it persist if you re-type it out? Delete the three options and enter them again?

What operating system are you using? What key are you pressing to make the new lines between the terms?

OS: WindowsNT 10.0 AMD 64 (virtual machine)
Key: “Enter” button

i tried in different ways to create a vocabulary, “type + enter”, “copy+ paste” and always same results. oh, reinstalling the module had no effect

This is perplexing. I can’t reproduce the error. Windows, Mac, and Unix operating systems each encode new lines in different ways. I initially thought this was the cause of your bug, but we’ve tested it on a Windows machine with no issues.

There is one thing you could try if you’re comfortable modifying code. Open this file:

/modules/CustomVocab/src/DataType/CustomVocab.php

And in this method:

CustomVocab.php::form()

Change this line from:

$terms = array_map('trim', explode(PHP_EOL, $this->vocab->terms()));

To:

$terms = array_map('trim', preg_split("/\r\n|\n|\r/", $this->vocab->terms()));

Then try adding a custom vocabulary.

This code is work. Now i can create a vocab. thnk you!

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.