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

An unexpected error has occurred: Option config has't been defined #1234

Closed
JoseB07 opened this issue Jun 18, 2018 · 12 comments
Closed

An unexpected error has occurred: Option config has't been defined #1234

JoseB07 opened this issue Jun 18, 2018 · 12 comments

Comments

@JoseB07
Copy link

JoseB07 commented Jun 18, 2018

please anybody can help me

I would thank you a lot
gg

@sebabaillet
Copy link

Same error here. Have you been able to solve it?

@JoseB07
Copy link
Author

JoseB07 commented Jun 26, 2018

no :CC

@sergeysviridenko
Copy link
Contributor

@sebabaillet @JoseB07 Could you take a look here

@sergeysviridenko
Copy link
Contributor

@sebabaillet @JoseB07 Have you solved this problem?

@sebabaillet
Copy link

sebabaillet commented Jul 27, 2018 via email

@KarenSlame
Copy link

can you help me with this error

@sebabaillet
Copy link

sebabaillet commented Sep 14, 2018 via email

@imthejano
Copy link

imthejano commented Oct 24, 2018

I got the same problem.. did anybody solve it?

@itachi789
Copy link

¿alguien ya por fin lo resolvio?

@rjbick
Copy link

rjbick commented Nov 28, 2018

The problem is webtools doesn't appear to be pulling custom config.php at the point of model creation.
I find this odd because I hack webtools.php in my public folder to read in the config.

Below is a crap hack since I'm to busy to fix it correctly:
in scripts/Phalcon/Builder/Model.php
Change line 91 from:
$this->modelOptions->setOption('config', $this->modelOptions->getOption('config'));
to:
$this->modelOptions->setOption('config', include '[path to your custom config]');

One of these days I'll find the real problem.

@gzhegow1991
Copy link

gzhegow1991 commented Dec 6, 2018

Just add to file scripts/Phalcon/Builder/Component.php damn:

extends \Phalcon\Di\Injectable

then replace (by some reason you try to set property from current object undefined property)

$this->modelOptions->setOption('config', $this->modelOptions->getOption('config'));

to this

$this->modelOptions->setOption('config', $this->config);

then you will use global object, what parsed from config file of your application

@Jeckerson Jeckerson added this to the 3.4.x milestone Mar 15, 2019
Jeckerson added a commit that referenced this issue Apr 2, 2019
@Jeckerson
Copy link
Member

Fixed

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

No branches or pull requests

9 participants