i'm following the tutorial Creating a Basic CMS but after configurate the CMF RoutingBundle like it's shown in Enable the Dynamic Router i got the following error when i try to load the fixture data
PHP Catchable fatal error: Argument 2 passed to Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer::__construct() must be of the type array, none given
here is my config.yml
cmf_routing:
chain:
routers_by_id:
cmf_routing.dynamic_router: 20
router.default: 100
dynamic:
enabled: true
persistence:
phpcr:
route_basepath: /cms/routes
you seem to have gotten a version mixup. you need either the 1.1.* family of phpcr-odm and phpcr-bundle with the routing-bundle 1.2.* or phpcr at 1.0.* and routing at 1.1.*
did you do any composer tricks or are the dependencies allowing this incompatible combination?
Related
I have been following the blog post here and I've made it to testing the function on my local environment. I've copy and pasted everything form the blog into my text editor. Nothing in my code is original - but I cannot get it to work! When I try to run it in my local environment, I get this error:
const b = bindings[key].toString();
^
TypeError: Cannot read properties of undefined (reading 'toString')
at PathTemplate.render (/Users/dialogflow-cx/node_modules/google-gax/build/src/pathTemplate.js:114:37)
at SessionsClient.projectLocationAgentSessionPath (/Users/dialogflow-cx/node_modules/#google-cloud/dialogflow-cx/build/src/v3/sessions_client.js:1237:75)
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
at process.<anonymous> (/Users/dialogflow-cx/node_modules/#twilio/runtime-handler/dist/dev-runtime/internal/functionRunner.js:74:9)
at process.emit (node:events:390:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I don't know where to go from here! Help!
Here your TypeError is "cannot read properties of undefined", that means at least one of your passed arguments is undefined.
As we go through your return error, second line directs to the "projectLocationAgentSessionPath" and this section refers to the "Setup the detectIntentRequest" in the blog .
session: client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
The above error means at least on of the objects that relates to projectId, location, agentId, SessionId is returning undefined.
To resolve the error you have to check whether you are passing correct environment variables the same as .env files or not?
Within the error, we can see that there is a reference to the code you are working on:
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
This refers to this line:
client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
Following the code through the dialogflow library and then the Google API extensions library shows that ultimately the code is running through the keys of the object that relate to the project, location, agent and session which map to the 4 arguments above. And at least one of them is returning undefined.
Have you added the correct environment variables to your .env file? Are you passing a dialogflow_session_id when you make a request to test this endpoint?
After changing searchkick's configuration from word_start to word_middle an error appears only in test environment, with development mode everything works fine.
Error message:
[400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"analyzer [searchkick_word_middle_index] not found for field [word_middle]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: analyzer [searchkick_word_middle_index] not found for field [word_middle]","caused_by":{"type":"mapper_parsing_exception","reason":"analyzer [searchkick_word_middle_index] not found for field [word_middle]"}},"status":400}
The solution was found. I needed to create custom analyzer with name: 'searchkick_word_middle_index'.
I've deployed spring-cloud-dataflow with Docker. These are the used containers:
springcloud/spring-cloud-dataflow-server-local:1.7.1.RELEASE
wurstmeister/zookeeper
wurstmeister/kafka:1.1.0
[other containers not involved in the issue ...]
Documentation consulted:
Spring Cloud Data Flow Reference Guide - 1.7.1.RELEASE
Header Enricher Processor
I am trying to use the header-enricher processor to add multiple headers, but i can only add one header.
With the following example:
time | header-enricher --headers="foo='bar' \n baz='qux'" --overwrite=true | log --expression=headers
Also add this propertie to the deployment
app.*.spring.cloud.stream.kafka.binder.headers=foo,baz
The header-enricher log is throwing next error at start.
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.integration.transformer.support.ExpressionEvaluatingHeaderValueMessageProcessor]: Circular reference involving containing bean 'org.springframework.cloud.stream.app.header.enricher.processor.HeaderEnricherProcessorConfiguration' - consider declaring the factory method as static for independence from its containing instance. Factory method 'processor' threw exception; nested exception is org.springframework.expression.spel.SpelParseException: EL1041E: After parsing a valid expression, there is still more data in the expression: 'baz'
EDIT: I am currently using these two ways to define the stream.
SCDF Dashboard: Throwing next error
SCDF Shell spring-cloud-dataflow-shell-1.7.2.RELEASE Throwing next error
and it seems that he does not accept the character \
Shell Quotes and Escaping
The issue is with your expression. You need to remove the double quotes
--headers=foo='bar' \n baz='qux'
I'm currently creating a Ext JS component that will be used to translate in different languages some words.
But I'm facing a problem, when I'm editing the list of words there is an uncaught error.
Uncaught Error: You are using a ServerProxy but have not supplied it with a url.
The problem is that I don't use a server proxy and I really don't know where this error comes from.
fiddle : https://fiddle.sencha.com/#view/editor&fiddle/2lbc
As someone an idea ?
Baptiste C.
I forked you fiddle and added proxy type of memory in your translationStore. Here's the FIDDLE
proxy: {
type: 'memory'
}
i am working in zendframework 2 in conjuction with doctrine 2
i am trying to use the orm:validate-schema to validate and generate tables in my database; i.e match the entity class User with a new table.
i followed the tutorial by marco pivetta
http://marco-pivetta.com/doctrine-orm-zf2-tutorial/#/24
however when i try to open the schema in my git i.e
andreea#Andreea-HP /cygdrive/c/users/andreea/zend/testingZend
./vendor/bin/doctrine-module orm:validate-schema
i get the following message:
Could not open input file:
/cygdrive/c/users/endy/zend/testingZend/vendor/doctrine/doctrine-module/bin/doctrine-module
does anyone have an idea why i am unable to open the page
warm regards
Andreea
hi again
followng the advice of foozi i tried the folllowing:
php public/index.php orm:validate-schema
however, i received the following error message:
Undefined index: APPLICATION_ENV in C:\Users\andreea\zend\testingZend\public\index.php on line 19
Call Stack:
0.0002 235176 1. {main}() C:\Users\andreea\zend\testingZend\public\index.php:0
Zend Framework 2.2.5 application
Usage:
Reason for failure: Invalid arguments or no arguments provided
PHP Notice: Undefined index: APPLICATION_ENV in C:\Users\andreea\zend\testingZend\public\index.php on line 19
PHP Stack trace:
PHP 1. {main}() C:\Users\andreea\zend\testingZend\public\index.php:0
i believe that the message is referring to the followng:
/**
* Display all errors when APPLICATION_ENV is development.
*/
if ('development' === $_SERVER['APPLICATION_ENV']) {
error_reporting(E_ALL);
ini_set("display_errors", 1);
}
would be gratful for some advice
Try to use doctrine command line over your application's index instead of directly doctrine-module binaries (actually both of them does same thing)
$ cd /your/zf2/project
$ php public/index.php orm:validate-schema
This is the way which i prefer.