Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Unable to load YAML file

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-21-2016, 11:03 AM
 
IDMDerek IDMDerek is offline
 

Newbie
  
Join Date: Jun 2016
Posts: 3
 

Default Unable to load YAML file

I am working on developing a new module so that a customer of ours already using X-Cart can use our payment system. I am following the tutorial in Webinar 3, running xcart under Apache on a Mac -- Yosemite.

When I try to use the load-yaml.php script I get the following:

PHP Catchable fatal error: Argument 1 passed to XLite\Core\Database::detectDirectives() must be of the type array, null given, called in /Library/WebServer/Documents/xcart/var/run/classes/XLite/Core/Database.php on line 803 and defined in /Library/WebServer/Documents/xcart/var/run/classes/XLite/Core/Database.php on line 1274

Any ideas what this is? My install.yaml file is the same as webinar 3 example (before the settings are added) but with my classes listed instead. I can provide more data if necessary.

Thanks!
__________________
-Derek Buckley
Developer, Identity Mind Global
Reply With Quote
  #2  
Old 06-22-2016, 12:56 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Unable to load YAML file

Hello Derek,

It looks like there is an error in your yaml file - for some reasons the script can't parse it.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 07-14-2016, 02:54 PM
 
IDMDerek IDMDerek is offline
 

Newbie
  
Join Date: Jun 2016
Posts: 3
 

Default Re: Unable to load YAML file

It seems the inability to parse the install.yaml file was from some unprintable characters (don't know if tabs or spaces must be consistent).

I made a new copy of the example file from Webinar 3 and replaced the module name with mine and it worked. I was using PHPStorm to create my files, and the editor tries to show an outline of the entries in the yaml file -- my file the indicators were not always present but in your sample file they were. Something in the "white space" was different.
__________________
-Derek Buckley
Developer, Identity Mind Global
Reply With Quote

The following user thanks IDMDerek for this useful post:
qualiteam (07-14-2016)
  #4  
Old 07-14-2016, 10:03 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Unable to load YAML file

Another thing to check is quotes - sometimes I have to go through all the source code (that was copied&pasted) and replace quotes with their correct ' and " versions manually.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:23 AM.

   

 
X-Cart forums © 2001-2020