We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Error in MetaDataReader.php when loading Gateways

Developer Preview

Brian Litzinger's avatar
Brian Litzinger
693 posts
8 years ago
Brian Litzinger's avatar Brian Litzinger

I was wondering if someone might be able to provide some insight with a strange error I’m seeing. I’ve had this similar bug report from 3 customers, yet I’ve been unable to replicate it locally myself (3 diff environments). The error always deals with not being able to load a Gateway class, e.g.

Fatal error: Class 'BoldMinded\Publisher\Model\Gateway\EntryTranslationTitleGateway' not found in /var/www/html/homepages/public/new/gerenciador/ee/EllisLab/ExpressionEngine/Service/Model/MetaDataReader.php on line 147
class EntryTranslation extends VariableColumnModel
{
    const NAME = 'publisher:EntryTranslation';

    protected static $_primary_key = 'id';
    protected static $_gateway_names = ['EntryTranslationTitleGateway', 'EntryTranslationDataGateway'];```
class EntryTranslationTitleGateway extends Gateway
{
    protected static $_table_name = 'publisher_titles';
    protected static $_primary_key = 'id';

    protected $site_id;
    protected $channel_id;
    protected $author_id;
    protected $entry_id;
    protected $lang_id;
    protected $status;
    protected $title;
    protected $url_title;
    protected $page_url;
    protected $hide_in_nav = 'n';
    protected $template_id = 0;
    protected $parent_id = 0;
    protected $entry_date;
    protected $edit_date;
    protected $edit_by;
}

The error is fairly clear in that the file isn’t getting loaded, but I’m having trouble understanding why. Especially when this is only happening to a small group of people (all of which are on php 5.6.x, as am I). I’m using composer’s autoload, and everything else loads fine all the time for me, and most customers, but a couple are reporting this error. Sometimes its on a different Gateway file, but its always a Gateway file.

I step debugged the synthesize() method that the error is occurring at, and I didn’t even see any of my classes that customers are reporting the errors with even passed through the synthesize() method, only my Language model. I don’t understand what synthesize is supposed to be doing.

       
Brian Litzinger's avatar
Brian Litzinger
693 posts
8 years ago
Brian Litzinger's avatar Brian Litzinger

I think this can be disregarded. I logged into a customer’s server and noticed that the folder was lower cased, e.g. Model/gateway, not Model/Gateway. Fixing the name fixes the issue. Though, I’m not sure how this has happened to 3 people as in my local dev env, zip page, and in Github it shows the folder as being capitalized.

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
8 years ago
Kevin Cupp's avatar Kevin Cupp

Glad you got it sorted! I was at a loss, but sounds like that would do it. Also not sure how those folders would end up lowercase, we have not seen that happen and our files are distributed the same way, and folks likely unzip them the same way, upload the same way, and are being used on the same hosts. And there shouldn’t be anything in EE that’s writing to these files. So, this is weird one!

       
Brian Litzinger's avatar
Brian Litzinger
693 posts
8 years ago
Brian Litzinger's avatar Brian Litzinger

Yeah, I have no idea why its happening. I’ve had folder name cases be different on the file system and in Git before, which is usually due to a renaming of the folder at some point, but the fact that its capitalized in Git and in my zip file that they are downloading is definitely a mind bender. I’ll just keep an eye out for this and see if its a recurring issue. At least now I know what the fix is even if it is inconvenient for them.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.