Symfony error with ImageField (Path not found) - symfony

The error is the following:
EasyCorp\Bundle\EasyAdminBundle\Field\Configurator\ImageConfigurator::getImagePath(): Argument #1 ($imagePath) must be of type ?string, resource given
I have the following code:
ImageField::new('imagen')
->setBasePath('images/uploads/')
->setUploadDir('public/images/uploads/')
but I don't know why when I try to access the easyAdmin 'Juegos' Form, it appears this error and it doesn't render the table.

Related

Deploying Microsoft.Maps/account

I have used an ARM Template to deploy a Microsoft.Maps/account resource to Azure.
That was successful:
Resource Microsoft.Maps/accounts 'nzmoebasedemo0000bt' provisioning status is succeeded
I'd like to retrieve the Primary key generated, within the ARM template, in order to persist it to a KeyVault.
I looked in https://resource.azure.com but the Maps/account provider was not listed, so could find no hint as to what property to read.
I tried:
[listKeys(resourceId('Microsoft.Maps/account', 'parameters('keyVaultVaultSecretMapsAccountResourceName')'), providers('Microsoft.Maps', 'account').apiVersions[0]).keys[0].value]"
Abd got back:
#{parameters=; status=Trial run failed. ; outputs=; provisionStateSucceeded=False; deploymentOutput=; errorCode=InvalidTemplate; errorMessage=Deployment template validation failed: 'The template resource 'azure.arm.base.keyVault.vault.secret' at line '168' and column '9' is not valid: Unable to evaluate template language function 'providers': function requires the second argument to be a multi-segmented resource type excluding the resource provider namespace. Invalid function argument 'account'. Please see https://aka.ms/arm-template-expressions/#providers for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'.}
Which in this case...seems incorrect.
What am I not seeing/getting?
Thanks!
Edit:
As per suggestion given, the following did pass a test run.
"[listKeys(resourceId('Microsoft.Maps/account', parameters('keyVaultVaultSecretMapsAccountResourceName')), '2018-05-01').keys[0].value]"
But when actually run, got the following:
1:02:35 AM - Resource Microsoft.Maps/account 'nzmoebasedemo0000bt' failed with message '{
"error": {
"code": "InvalidResourceType",
"message": "The resource type could not be found in the namespace 'Microsoft.Maps' for api version '2018-05-01'."
}
}'
Edit again:
As per guidance given in the comments, the following works! (after correcting api version, spelling mistake, and using 'primaryKey' property:
"[listKeys(resourceId('Microsoft.Maps/accounts', parameters('keyVaultVaultSecretMapsAccountsResourceName')), '2018-05-01').primaryKey]"
So the problem was due to a typo, the provider\resource is Microsoft.Maps/accounts

Odoo report error (translate_doc....)

I've modified a report in Odoo and am trying to display some data when I print an invoice. Currently I am having a problem with a field which I've created myself. I'm trying to call the field as below:
<span t-field="company.payment_methods"/>
however when I try and print the report I get the error message:
QWebException: "'NoneType' object has no attribute '_fields'" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_document')"
Any help getting around this error? If I take out that field then I don't get the same error and it just prints normally
Thanks

Catchable WP_Error

I am getting this error on my WordPress installation
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/user/public_html/wp-includes/taxonomy.php on line 390
I tried to disable all themes and plugins by renaming the plugins folder but I can't access the backend.
Please advice
UPDATE: I replaced all the files inside wp-admin and wp-includes and it brought me back to the original error I had, which points to rewrite.php instead of taxonomy.php (in other words, taxonomy.php was an error received as a result of changing something in wp-includes).
The real error is:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/tsbiet/public_html/wp-includes/rewrite.php on line 280
Still looking for help on this question. Thanks.
This error can happen if you somehow delete a custom taxonomy that is linked to a menu item.
Back up your database, go to the to wp_term_taxonomy table and query for all records with nav_menu in the taxonomy column and delete them.

Configuration SonataMediaBundle from the Symfony2 framework

I finished configuring SonataMediaBundle successfully then the page
/formation/web/app_dev.php/admin/dashboard
is displayed.
But when I click "list" (menu Media), I get this error:
An exception has been thrown during the rendering of a template
("Parameter "id" for route "admin_sonata_media_media_edit" must match
"[^/]++" ("" given) to generate a corresponding URL.") in
SonataMediaBundle:MediaAdmin:list_custom.html.twig at line 17.
Any ideas?
I think your problem is based on this known issue:
Sonata type model - hide/delete the "create" button · Issue #530 · sonata-project/SonataAdminBundle
It is recommended to update to Doctrine 2.4

Unable to get rendered content error in SDL Tridion

I would like to know the scenarios in which "Unable to get rendered content" error might occur in SDL Tridion. We use VBScript for templating and I get a few scenarios as listed below in my event logs. But I am not able to make head or tail of it.
Scenario 1:
Unable to get rendered content of Page (tcm:48-215280-64).
Error 5 occurred while rendering the Component Presentation (SMS gruppe:Artikkel):
Invalid procedure call or argument: 'RemoveChild' (source:
.RemoveChild .selectSingleNode("tcm).
Scenario 2:
Unable to get rendered content of Component (tcm:57-215271).
No data found. [ETA_ITEMS, U]
Cannot insert the value NULL into column 'ITEM_ID', table 'Tridion_cm_2011.dbo.ITEM_ASSOCIATIONS'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Scenario 3:
Unable to get rendered content of Page (tcm:52-213774-64).
Error 1017 occurred while rendering the Page: Expected 'Then' (source:
If Rendermode() != "PreviewDynamic" Then).
Scenario 4:
Unable to retrieve rendered data from Component Presentation.
Error 3004 occurred while rendering the Component Presentation (Nytt dagstilbud iPhone 4S:Artikkel):
Write to file failed. (source:
.SaveToFile strTempFile, conSaveCreateOverWrite).
Scenario 5:
Unable to get rendered content of Page (tcm:48-215164-64).
Error 3004 occurred while rendering the Component Presentation (Ring inn julen med Comoyo:Artikkel):
Write to file failed. (source:
.SaveToFile strTempFile, conSaveCreateOverWrite).
Scenario 6:
Unable to get rendered content of Page (tcm:48-215164-64).
Invalid value for property 'BinaryContent'. Unable to open uploaded file: C:\Windows\TEMP\tcm-48-215158square940.jpg.
It would be helpful if any of you could give me any clue as of where the problem might possibly be so that I could have a lead. Thanks a lot in advance!
Scenario 1 looks like a VBScript syntax error, so most likely a typo in your template code. Scenario 2 looks a bit more problematic, because its a database error. Scenario 3, 4, 5 and 6 all look like standard VBScript syntax errors again.
Some examples, Scenario 3:
If Rendermode() != "PreviewDynamic" Then
Has a syntax error and it mentions Expected 'Then' so we know the error is somewhere before the Then statement. Taking a closer look, you have parentesis behind the variable RenderMode, which is incorrect, it should be:
If RenderMode != "PreviewDynamic" Then

Resources