I need to work on a site made with symfony, I downloaded directories, and files from live (working) site on my local environment, and when trying to access the site it gives me:
The json file 'path-to/htdocs/config/maps.json' is missing
I undesrtand I should change that somewhere as it should be;
/htdocs/SITE_NAME/config/maps.json
but where do I change that?
If you think there are some other path changes to be made, please suggest them.
Thank you
EDIT to add sample of map.json
{
"routes": [
{
"request": "admin\/home",
"controller": "Admin\/Index",
"title": "Administration Panel",
"injections": [],
"tpl": "index.html.twig",
"dependancies": [
"Admin\/AdminLogin"
],
"css": [
"http:\/\/fonts.googleapis.com\/css?family=Molle:400italic",
"http:\/\/fonts.googleapis.com\/css?family=Monda:700",
"\/deployment\/css\/mods\/admin_mod\/admin.css",
"\/deployment\/css\/mods\/admin_mod\/interface.css",
"\/deployment\/css\/mods\/admin_mod\/admin-custom.css"
],
"js": [
"\/js\/Vendors\/jquery-2.1.1.min.js",
"\/js\/Vendors\/angular.min.js",
"\/js\/modules\/ngUtils.js",
"\/js\/Vendors\/ckeditor\/ckeditor.js",
"\/js\/Vendors\/ngDialog.js",
"\/js\/Mods\/Admin_mod\/definitions.js"
],
"keywords": [
"administration panel",
"admin panel"
],
"description": "Web site administration panel"
},
{
"request": "admin\/logout",
"controller": "Admin\/AdminLogin:logout",
"injections": [
"entityManager"
],
"params": [],
"dependancies": [],
"css": [],
"js": []
},
{
"request": "",
"controller": "",
"injections": [],
"dependancies": [],
"params": [],
"tpl": "",
"css": [],
"js": [],
"title": "",
"keywords": [],
"description": []
},
Related
I have the following config file, that comes from the export command
{
"rabbit_version": "3.9.18",
"rabbitmq_version": "3.9.18",
"product_name": "RabbitMQ",
"product_version": "3.9.18",
"users": [{
"name": "bureau_user",
"password_hash": "gr0kazwxxxxxxOQwblCoB68LX3hcr0QFVl+a/0M5gLYIScw",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": [],
"limits": {}
}, {
"name": "monolito_user",
"password_hash": "tT3rNrxxxxxxDJ9Rp3kJ8ul1vGRCmS/2aYjxDUub/NSKvnSe",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": [""],
"limits": {}
}, {
"name": "guest",
"password_hash": "WRz7lNSxxxxxxkNClznlp1uJ5g9HJFwm8ANK3IPOyuoUmWw",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": ["administrator"],
"limits": {}
}],
"vhosts": [{
"name": "/"
}],
"permissions": [{
"user": "guest",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
}, {
"user": "monolito_user",
"vhost": "/",
"configure": ".*", <<<<<< with this empty, I get the error
"write": ".*",
"read": ".*"
}],
"topic_permissions": [],
"parameters": [],
"global_parameters": [{
"name": "internal_cluster_id",
"value": "rabbitmq-cluster-id-e5ChXZuOJaCyj8rQwbGkLA"
}],
"policies": [],
"queues": [{
"name": "messages",
"vhost": "/",
"durable": true,
"auto_delete": false,
"arguments": {}
}],
"exchanges": [{
"name": "messages",
"vhost": "/",
"type": "fanout",
"durable": true,
"auto_delete": false,
"internal": false,
"arguments": {}
}],
"bindings": [{
"source": "messages",
"vhost": "/",
"destination": "messages",
"destination_type": "queue",
"routing_key": "",
"arguments": {}
}]
}
based on tests, I came to the conclusion that if the user doesn't have the configure permissions, then I can't post messages form Symfony Messenger/PHP
"Server channel error: 403, message: ACCESS_REFUSED - access to exchange 'messages' in vhost '/' refused for user 'monolito_user'", class: "AMQPExchangeException"
If I add the configure permission, then the user can do it.
Why is that? I thought only write/read would do.
I need help in creating products in akeneo product api usi api call.
when i add product in that api It always give error "This value should not be blank." I have changed all the parameters given in the documentation but with no result
parameters {
"identifier": "AT-TN-136-B-NCAL",
"enabled": true,
"family": "camcorders",
"categories": [
"master"
],
"groups": [],
"parent": null,
"values": {},
"associations": {}
}
result
{
"code": 422,
"message": "Validation failed.",
"errors": [
{
"property": "identifier",
"message": "This value should not be blank."
}
]
}
There is a key:value pair probably missing inside your parameters.
Try using the akeneo api with Postman to see the in and outs for the api.
Link to api docs => https://api.akeneo.com/getting-started/your-first-tutorial-4x/welcome.html
Here is an example i took trough postman, it might give you a better look at how an api Product Post should look.
{
"identifier": "new_product",
"family": "tshirts",
"groups": [],
"parent": null,
"categories": [
"tvs_projectors"
],
"enabled": true,
"values": {
"clothing_size": [
{
"locale": null,
"scope": null,
"data": "s"
}
],
"description": [
{
"locale": "en_US",
"scope": "mobile",
"data": "Akeneo T-Shirt"
},
{
"locale": "en_US",
"scope": "print",
"data": "Akeneo T-Shirt with short sleeve"
}
],
"main_color": [
{
"locale": null,
"scope": null,
"data": "black"
}
],
"name": [
{
"locale": null,
"scope": null,
"data": "Akeneo T-Shirt black and purple with short sleeve"
}
],
"secondary_color": [
{
"locale": null,
"scope": null,
"data": "purple"
}
],
"tshirt_materials": [
{
"locale": null,
"scope": null,
"data": "cotton"
}
],
"tshirt_style": [
{
"locale": null,
"scope": null,
"data": [
"crewneck",
"short_sleeve"
]
}
],
"price": [
{
"locale": null,
"scope": null,
"data": [
{
"amount": 10,
"currency": "EUR"
},
{
"amount": 14,
"currency": "USD"
}
]
}
]
},
"created": "2017-03-30T14:55:26+02:00",
"updated": "2017-05-04T23:56:09+02:00",
"associations": {
"SUBSTITUTION": {
"groups": [],
"products": [
"AKNSTK"
]
}
}
}
I am very new at this. So please be patient in my lingo and explanation.
I would like to know is this a google limitation or problem or am I using it incorrectly?
I am moving from v2beta to v3 for permissions/list call. I see that v2beta result have more detailed. I notice there are many missing fields, the specific field I am interested in is 'domain'. When I run the v3 code (my backend code) it contains domain but the data is null, I am using fields=*. I verified it with v2 API and the domain value is populated
As you can see there is no domain for v3 using fields=*
{
"kind": "drive#permissionList",
"permissions": [
{
"kind": "drive#permission",
"id": "####################",
"type": "user",
"emailAddress": "#########",
"role": "organizer",
"displayName": "Admin User",
"teamDrivePermissionDetails": [
{
"teamDrivePermissionType": "member",
"role": "organizer",
"inherited": false
}
],
"permissionDetails": [
{
"permissionType": "member",
"role": "organizer",
"inherited": false
}
],
"deleted": false
}
]
}
For v2
{
"kind": "drive#permissionList",
"etag": "\"##########/#############\"",
"selfLink": "https://www.googleapis.com/drive/v2/files/########/permissions?supportsTeamDrives=true",
"items": [
{
"kind": "drive#permission",
"etag": "\"################\"",
"id": "##############",
"selfLink": "https://www.googleapis.com/drive/v2/files/#############/permissions/#############",
"name": "Admin User",
"emailAddress": "###############",
"domain": "<the value is correct, just hidden>",
"role": "organizer",
"type": "user",
"teamDrivePermissionDetails": [
{
"teamDrivePermissionType": "member",
"role": "organizer",
"inherited": false
}
],
"permissionDetails": [
{
"permissionType": "member",
"role": "organizer",
"inherited": false
}
],
"deleted": false
}
]
}
What am I missing? Please help!!! Thanks in advance.
I have verified it with
'Try the API'
https://developers.google.com/drive/api/v3/reference/permissions/list
and
https://developers.google.com/drive/api/v2/reference/permissions/list
According to the permission resources, https://developers.google.com/drive/api/v3/reference/permissions#resource, domain should be there. But it isn't.
I have created a Linnworks Application (Channel Integration), after created I have published it. Now when I want to integration this APP then it is displaying error.
{
"LinnworksPermissions": [
"GlobalPermissions.Inventory.MyInventoryNode",
"GlobalPermissions.PurchaseOrder.ViewPurchaseOrderNode",
"GlobalPermissions.Inventory.Stock.StockReadNode",
"GlobalPermissions.OrderBook.ViewOrderDetailsNode",
"GlobalPermissions.OrderBook.OpenOrdersNode",
"GlobalPermissions.Settings.ApplicationSettingsNode",
"GlobalPermissions.Settings.ChannelIntegration.ChannelMappingNode",
"GlobalPermissions.Settings.ChannelIntegration.ChannelDetailsNode"
],
"Modules": [
{
"RequiredPermissionId": null,
"moduleName": null,
"formattedName": null,
"icon": null,
"path": null,
"type": "ChannelIntegration",
"group": [],
"parameters": [
{
"name": "ChannelName",
"value": "TIGERPARROTCHANNEL"
},
{
"name": "ChannelFriendlyName",
"value": "Tiger Parrot"
},
{
"name": "ChannelLogoURL",
"value": "http://example.com/testAPI/images/logotp.png"
},
{
"name": "AddNewUserEndpoint",
"value": "http://example.com/linnworks-api/get_users.php"
},
{
"name": "UserConfigEndpoint",
"value": "http://example.com/linnworks-api/userConfig.php"
},
{
"name": "SaveConfigEndpoint",
"value": "http://example.com/linnworks-api/saveUserConfig.php"
}
],
"files": null
}
]
}
When I'll go for integration then this code is displaying error. Bellow is the error message:
Error Message:
So can anybody help me to do in PHP.
I have a JSON Object like so:
{
"statusCode": 0,
"statusMessage": "OK",
"content": {
"templateId": "5a00775807105e735085c65d",
"authorId": "fabio.peddis#bsc.it",
"title": "Primo Template",
"description": "Descrizione del Primo Template",
"status": 0,
"saveDate": 1509979998738,
"publishDate": null,
"keywords": [
"keyDue",
"keySecondo"
],
"icon": null,
"questions": [
{
"questionId": 1,
"questionText": "Domanda 01?",
"responses": [
{
"keywords": [
"Sì",
"Yes",
"Oui"
],
"nextQuestionId": 11
},
{
"keywords": [
"No",
"Not",
"Non"
],
"nextQuestionId": 12
}
]
},
{
"questionId": 11,
"questionText": "Domanda 11?",
"responses": [
{
"keywords": [
I pass it to a view after doing this:
$objResp=json_decode($response);
Then on the view I simply access it like so:
#foreach($template->content->questions as $question)
...
{{$question->questionText}}
...
#foreach($question->responses as $res )
....
#endforeach
#endforeach
"Responses" is a different structure but at the same level as "questionText" that I can easily access it.
So the problem is in the second/internal loop, it crashes without hope..., but if I do a dd() of $question->responses, I can see the correct contents of an array size2.
Laravel gives me back this error with the loop:
Undefined property: stdClass::$responses
What is causing this error?
You can try setting a key for each response.
Like:
"responses": [
"1": {
"keywords": [
"Sì",
"Yes",
"Oui"
],
"nextQuestionId": 11
},
"2": {
"keywords": [
"No",
"Not",
"Non"
],
"nextQuestionId": 12
}
]
There is multiple ways to reresent json and I think this json syntax is not supported by php.
Pass true as the second argument to json_decode.
$objResp=json_decode($response, true);