md-systems / file_entity Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: File Entity moved to Media team, use the official repository.
Home Page: https://github.com/drupal-media/file_entity
DEPRECATED: File Entity moved to Media team, use the official repository.
Home Page: https://github.com/drupal-media/file_entity
There is an exception about FileEntityNormalizer::getEntityUri($entity) not matching the parent class: ContentEntityNormalizer::getEntityUri(EntityInterface $entity)
Adding EntityInterface to the FileEntityNormalizer method isn't enough though, since FileEntity doesn't implement the EntityInterface yet.
I had a look at the test fails and started fixing them, but I currently have some problems with my development environment which make the tests take ages.
It's mosty just updating the test asserts (the exceptions are now unexpected :D), the xpath calls are all empty and one config (views.view.past_event_log) needs a dependency on the víews module.
When updating a file, we have a fatal error:
Drupal\Core\Entity\EntityStorageException: 'thumbnail' not found in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 757 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Entity\Query\Sql\Tables->addField('thumbnail.fid', 'INNER', NULL)
Drupal\Core\Entity\Query\Sql\Condition->compile(Object)
Drupal\Core\Entity\Query\Sql\Query->compile()
Drupal\Core\Entity\Query\Sql\Query->execute()
Drupal\file_entity\Entity\FileEntity->updateImageFieldDimensions()
Drupal\file_entity\Entity\FileEntity->postSave(Object, 1)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, 1)
Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, 1)
Drupal\Core\Entity\EntityStorageBase->save(Object)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object)
Drupal\Core\Entity\Entity->save()
Do we have any reasons not to do that?
With Beta 16 and File Entity at 4654bdf
I'm hitting this line in TypedDataManager
throw new \InvalidArgumentException("Property $property_name is unknown.");
Wrapping these two lines in a check for ImageItem fixes the issue.
if (!$field_item instanceof ImageItem) {
$data['_embedded'][$field_uri][0]['display'] = $field_item->get('display')->getValue();
$data['_embedded'][$field_uri][0]['description'] = $field_item->get('description')->getValue();
}
The issue is that the normalizer is being applied for ImageItem which does not have those fields.
Ran into an issue which I posted about first over here:
http://drupal.stackexchange.com/questions/177519/route-parameter-upcasting-and-route-access
Finally realized that having the path as a quoted string was not working. But now, why is it that File Entity and now my custom module has to have non quoted strings as paths for parameter upcasting to work? Is this a core problem or did I miss something? The node module has all of its paths quoted, with parameters. If there is a convention or reason to it I would like to know.
I'm just logging this here before I forget.
In order to GET a file that I created via POST (with my UID) I need to have the Bypass file access control permission. No other combination seems to work except user 1.
*:Download any files should be enough I'd've thought.
Follow-up to #42
Deleting more than one file on admin/content/files by checking the box, selecting 'Delete file' and hitting 'Apply' is broken. No idea why yet.
In the image field, the custom fields and the values for alt and title don't appear.
Maybe someone can give a hint, how to fix this, then i will try to create a patch.
Fatal error: Call to a member function getConfigDependencyName() on a non-object in core/lib/Drupal/Core/Entity/EntityDisplayBase.php on line 165
Stack track:
PHP Fatal error: Call to a member function getConfigDependencyName() on a non-object in web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php on line 165
PHP Stack trace:
1. {main}() web/index.php:0
2. Drupal\\Core\\DrupalKernel->handle() web/index.php:22
3. Stack\\StackedHttpKernel->handle() web/core/lib/Drupal/Core/DrupalKernel.php:563
4. Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle() vendor/stack/builder/src/Stack/StackedHttpKernel.php:23
5. Drupal\\Core\\StackMiddleware\\PageCache->handle() web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php:58
6. Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle() web/core/lib/Drupal/Core/StackMiddleware/PageCache.php:52
7. Symfony\\Component\\HttpKernel\\HttpKernel->handle() web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php:53
8. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:66
9. call_user_func_array() vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:145
10. Drupal\\Core\\Controller\\HtmlPageController->content() vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:145
11. Drupal\\Core\\Controller\\HtmlPageController->getContentResult() web/core/lib/Drupal/Core/Controller/HtmlPageController.php:53
12. call_user_func_array() web/core/lib/Drupal/Core/Controller/HtmlPageController.php:76
13. Drupal\\Core\\Controller\\FormController->getContentResult() web/core/lib/Drupal/Core/Controller/HtmlPageController.php:76
14. Drupal\\Core\\Form\\FormBuilder->buildForm() web/core/lib/Drupal/Core/Controller/FormController.php:81
15. Drupal\\Core\\Form\\FormBuilder->processForm() web/core/lib/Drupal/Core/Form/FormBuilder.php:266
16. Drupal\\Core\\Form\\FormSubmitter->doSubmitForm() web/core/lib/Drupal/Core/Form/FormBuilder.php:487
17. Drupal\\Core\\Form\\FormSubmitter->executeSubmitHandlers() web/core/lib/Drupal/Core/Form/FormSubmitter.php:56
18. call_user_func_array() web/core/lib/Drupal/Core/Form/FormSubmitter.php:116
19. Drupal\\system\\Form\\ModulesListForm->submitForm() web/core/lib/Drupal/Core/Form/FormSubmitter.php:116
20. Drupal\\Core\\Extension\\ModuleHandler->install() web/core/modules/system/src/Form/ModulesListForm.php:508
21. Drupal\\Core\\Config\\ConfigInstaller->installDefaultConfig() web/core/lib/Drupal/Core/Extension/ModuleHandler.php:849
22. Drupal\\Core\\Config\\ConfigInstaller->createConfiguration() web/core/lib/Drupal/Core/Config/ConfigInstaller.php:125
23. Drupal\\Core\\Entity\\Entity->save() web/core/lib/Drupal/Core/Config/ConfigInstaller.php:233
24. Drupal\\Core\\Config\\Entity\\ConfigEntityStorage->save() web/core/lib/Drupal/Core/Entity/Entity.php:325
25. Drupal\\Core\\Entity\\EntityStorageBase->save() web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:232
26. Drupal\\Core\\Entity\\EntityDisplayBase->preSave() web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:395
27. Drupal\\Core\\Config\\Entity\\ConfigEntityBase->preSave() web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php:150
28. Drupal\\Core\\Entity\\EntityDisplayBase->calculateDependencies() web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:309
It looks like there is some code in the installer which disables the core view:
if ($view = View::load('files')) {
$view->disable();
$view->save();
}
This code works, but for some reason it cannot load the view during the installation of file_entity, even though file is a dependency.
Hi there. Please tell me if you're not answering questions here ;)
I've just installed the updated version with D8 HEAD (which is now installing well thank you).
I've:
Expected result
Actual result
{
"message": "Not Acceptable.",
"supported_mime_types": [
"text/html",
"application/vnd.drupal-ajax",
"application/vnd.drupal-dialog",
"application/vnd.drupal-modal"
]
}
Is this expected?
node/{nid} snippet
{
"_links": {
// ...
"http://local.d8.example.com/rest/relation/node/article/field_file": [
{
"href": "http://local.d8.example.com/file/1"
}
]
},
// ...
"_embedded": {
// ...
"http://local.d8.example.com/rest/relation/node/article/field_file": [
{
"_links": {
"self": {
"href": "http://local.d8.example.com/file/1"
},
"type": {
"href": "http://local.d8.example.com/rest/type/file/document"
}
},
"uuid": [
{
"value": "e1438f29-f109-4e55-a660-967eb2bb5a0e"
}
],
"display": "1",
"description": ""
}
]
},
// ...
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.