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.
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.
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!
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.