Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Extract Metadata #2

Closed
jimsafley opened this issue Oct 14, 2021 · 9 comments
Closed

Documentation: Extract Metadata #2

jimsafley opened this issue Oct 14, 2021 · 9 comments
Assignees

Comments

@jimsafley
Copy link
Contributor

This module needs documentation. Much of it has already been written in the README.

@katknow
Copy link

katknow commented Oct 20, 2021

Working on a draft of the documentation here.

However, as I started to take screenshots I noticed I'm getting a new error under "Refresh and map metadata" that I wasn't getting during testing:

TypeError
Argument 2 passed to ExtractMetadata\Module::mapMetadata() must be of the type array, null given, called in /var/www/html/katknow/OmekaSTesting/modules/ExtractMetadata/Module.php on line 491

Details:

TypeError: Argument 2 passed to ExtractMetadata\Module::mapMetadata() must be of the type array, null given, called in /var/www/html/katknow/OmekaSTesting/modules/ExtractMetadata/Module.php on line 491 and defined in /var/www/html/katknow/OmekaSTesting/modules/ExtractMetadata/Module.php:435
Stack trace:
#0 /var/www/html/katknow/OmekaSTesting/modules/ExtractMetadata/Module.php(491): ExtractMetadata\Module->mapMetadata(Object(Omeka\Entity\Media), NULL)
#1 /var/www/html/katknow/OmekaSTesting/modules/ExtractMetadata/Module.php(159): ExtractMetadata\Module->performAction(Object(Omeka\Entity\Media), 'refresh_map')
#2 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): ExtractMetadata\Module->ExtractMetadata{closure}(Object(Laminas\EventManager\Event))
#3 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event))
#4 /var/www/html/katknow/OmekaSTesting/application/src/Api/Adapter/AbstractEntityAdapter.php(615): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event))
#5 /var/www/html/katknow/OmekaSTesting/application/src/Api/Adapter/AbstractEntityAdapter.php(417): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#6 /var/www/html/katknow/OmekaSTesting/application/src/Api/Manager.php(233): Omeka\Api\Adapter\AbstractEntityAdapter->update(Object(Omeka\Api\Request))
#7 /var/www/html/katknow/OmekaSTesting/application/src/Api/Manager.php(136): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#8 /var/www/html/katknow/OmekaSTesting/application/src/Mvc/Controller/Plugin/Api.php(152): Omeka\Api\Manager->update('items', '13602', Array, Array, Array)
#9 /var/www/html/katknow/OmekaSTesting/application/src/Controller/Admin/ItemController.php(245): Omeka\Mvc\Controller\Plugin\Api->update('items', '13602', Array, Array)
#10 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): Omeka\Controller\Admin\ItemController->editAction()
#11 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#12 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#13 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(105): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#14 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#15 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#16 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#17 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#18 /var/www/html/katknow/OmekaSTesting/index.php(21): Laminas\Mvc\Application->run()
#19 {main}

This is different than the error I had that disappeared during testing, which was under "Map metadata," which is still working.

@jimsafley
Copy link
Contributor Author

I made a change that should fix the issue. Pull and try it out. It's an odd one, though. If it doesn't break, the problem was that the media's file doesn't exist - which it should.

@katknow
Copy link

katknow commented Oct 20, 2021

That seemed to do it--thanks!

@jimsafley
Copy link
Contributor Author

In the documentation you reference the "Extract Metadata" vocabulary. That vocabulary no longer exists. Please remove all references to it in the docs. You should also delete the vocabulary under "Vocabularies".

@katknow
Copy link

katknow commented Oct 21, 2021

Could you point me more specifically to where in the document you are referring re. vocabularies? Also, are the extractors/mappers sections okay to be included as they are in the README? I didn't really edit them because I don't know much about them. Thank you!

@jimsafley
Copy link
Contributor Author

Could you point me more specifically to where in the document you are referring re. vocabularies?

Under the "Adding media" section that begins with "Once you've added media to an item, you can add the extracted metadata to the item's metadata under the Values tab..." None of that applies. Metadata extraction is automatic and doesn't require the user's interaction - no adding a property, no selecting a value type, none of that. All you need to say here is metadata extraction is automatic. No additional action is needed.

are the extractors/mappers sections okay to be included as they are in the README?

Yes, that's fine.

@katknow
Copy link

katknow commented Oct 21, 2021

Thanks for the clarification! Will take that out.

@jimsafley
Copy link
Contributor Author

Under "Adding media":

You can view the extracted metadata under the Extract Metadata tab on the item edit page.

You cannot view the extracted metadata from the item edit page. You can only view it on the media show and edit pages.

Alternatively, you can click the link in your newly added field to view the media page with extracted metadata.

There is no "newly added field." There are links to media on the item show sidebar where users can see the metadata.

@katknow
Copy link

katknow commented Oct 25, 2021

Sorry about that, I thought I understood after I had asked on the testing and went in the opposite direction. I’ve removed those lines and instead pointed to the media show and edit pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants