Skip to content

2.4.0 Class Temando\Shipping\Model\Source\PackagingType does not exist #30278

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

Closed
haxor211 opened this issue Oct 1, 2020 · 3 comments
Closed
Labels
Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report.

Comments

@haxor211
Copy link

haxor211 commented Oct 1, 2020

I have ran the query in my database and removed 3 rows.. the problem still persists, what do I do?? I dont want to enable this useless module.

I also used the new module in 2.4.0 "Temando_ShippingRemover" and ran setup:upgrade, still doesnt work!!

I also tried deleting the attributes starting with "ts_%" in datatbase, this doesnt help either!!!!

The error "Exception #0 (ReflectionException): Class Temando\Shipping\Model\Source\PackagingType does not exist" is still here. Help me out please its driving me insane

Originally posted by @haxor211 in #25430 (comment)

@m2-assistant
Copy link

m2-assistant bot commented Oct 1, 2020

Hi @haxor211. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@haxor211
Copy link
Author

haxor211 commented Oct 2, 2020

I have searched my whole database for entries like "temando" or "ts_*" nothing to be found... the biggest shock to me is that I have attributes such as "ts_dimensions_height" in my backend in attributes section, yet I cant find it anywhere in the database!!!

Can someoone help me and tell me whats going on here with this shitty module?

@haxor211 haxor211 closed this as completed Oct 2, 2020
@sdzhepa sdzhepa added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 11, 2020
@Genaker
Copy link

Genaker commented Feb 28, 2024

Magento 2 Core has a core issue. When the source model of the EAV class from the Database does not exist magento throws

ReflectionException

Exception #0 (ReflectionException): Class "**\Model\Config\Source***\Options" does not exist

/var/www/html/magento/vendor/magento/framework/Code/Reader/ClassReader.php

 public function getConstructor($className)
    {
        $class = new ReflectionClass($className); <-- Exception happens here 

however, it has logic to tell you exactly what attribute Model is missing

/var/www/html/magento/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php

public function getSource()
    {
        if (empty($this->_source)) {
            if (!$this->getSourceModel()) {
                $this->_source = $this->_getDefaultSourceModel();
            } else {
                $this->_source = $this->getSourceModel();
            }
        
            if (!$source) {
                throw new LocalizedException(
                    __(
                        'Source model "%1" not found for attribute "%2"',
                        $this->getSourceModel(),
                        $this->getAttributeCode()
                    )
                );
            }

but this logic never happens because it is an Exception(ReflectionException) not a bool value

you need to add this code and check exception

public function getSource()
{
if (empty($this->_source)) {
if (!$this->getSourceModel()) {
$this->_source = $this->_getDefaultSourceModel();
} else {
$this->_source = $this->getSourceModel();
}
try {
$source = $this->_universalFactory->create($this->_source);
} catch (\ReflectionException $e) {
$source = false;
}
if (!$source) {
throw new LocalizedException(
__(
'Source model "%1" not found for attribute "%2"',
$this->getSourceModel(),
$this->getAttributeCode()
)
);
}

then an exception will be self-explained:

Exception #0 (Magento\Framework\Exception\LocalizedException): Source model "*****\Model\Config\Source*\Options" not found for attribute "some_attribute"

Please fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report.
Projects
Archived in project
Development

No branches or pull requests

3 participants