4

I was playing with one store and noticed some weird behavior. When I tried to edit the Payment Methods title, it saved as garbage characters. Refer the snapshot.Garbage Payment Method Title

Garbage characters was saved not only in titles but all the input text fields with some values.

7
  • Never seen this. Did you try a different browser? May 12, 2013 at 9:13
  • @sonassi Yeah it's happening in all browsers.
    – MagePsycho
    May 12, 2013 at 9:29
  • Then go through the debug process and report back. sonassi.com/knowledge-base/magento-debug-process May 12, 2013 at 16:08
  • Any movement on this? I'm curious as to the solution.
    – philwinkle
    May 16, 2013 at 4:34
  • 1
    Is this with the default Saved CC method? It looks like something changed the backend type of this field to encrypted. If that is the case echo Mage::helper('core')->decrypt(GARBAGE); should return the title you entered initially. Jun 6, 2013 at 0:29

2 Answers 2

3

This could also be related to this bug Magento - Error Saving Configuration - Encrypting The bug is fixed in app/code/core/Mage/Adminhtml/Model/Config/Data.php

    /**
     * Get field backend model
     */
    unset( $backendClass ); // Add this line
    if (isset($fieldConfig->backend_model)) {
        $backendClass = $fieldConfig->backend_model;
    }
    if (!isset($backendClass)) {
        $backendClass = 'core/config_data';
    }
1
  • This worked like a charm...!!! Nov 9, 2015 at 9:38
2

I think you need to go through the installed extensions' system.xml files to check if any of them extend payment/ccsave/title and override the default back-end model by adding:

<backend_model>adminhtml/system_config_backend_encrypted</backend_model>

Additionally you can check if this class Mage_Adminhtml_Model_Config_Data is unmodified. The below code sets the default

/**
 * Get field backend model
 */
$backendClass = $fieldConfig->backend_model;
if (!$backendClass) {
    $backendClass = 'core/config_data';
}

The same class also dispatches this event model_config_data_save_before which could be used by someone to tinker with the config data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.