Git Product home page Git Product logo

emailtemplatefilter's People

Contributors

brendo avatar nickdunn avatar nitriques avatar timriley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emailtemplatefilter's Issues

Fatal error: Call to private method FrontendPage::__processDatasources()

When I submit the form look the message I've got.

<br />
<b>Fatal error</b>:  Call to private method FrontendPage::__processDatasources() from context 'Extension_EmailTemplateFilter' in <b>C:\htdocs\globex_mm\extensions\emailtemplatefilter\extension.driver.php</b> on line  <b>328</b><br />

Blank email

I just started using this extension for the first time. It's really great and seems to work just fine except for the fact that I only manage to send blank emails.

Is there anything special I might have forgotten or is anybody else experiencing this issue?

Patch in README for 2.0.1

The suggested patch in the README is for 2.0.1. I've diff'd this with the function in 2.0.4 and came up with this:

public function __processDatasources($datasources, &$wrapper, $params = array()){

        if(trim($datasources) == '') return;

        $datasources = preg_split('/,\s*/i', $datasources, -1, PREG_SPLIT_NO_EMPTY);
        $datasources = array_map('trim', $datasources);

        if(!is_array($datasources) || empty($datasources)) return;

        $this->_env['pool'] = $params;
        $pool = $params;

        $dependencies = array();

        foreach($datasources as $handle){

            $this->_Parent->Profiler->seed();

            $pool[$handle] =& $this->DatasourceManager->create($handle, NULL, false);

            $dependencies[$handle] = $pool[$handle]->getDependencies();

            unset($ds);

        }

        $dsOrder = $this->__findDatasourceOrder($dependencies);

        foreach($dsOrder as $handle){

            $this->_Parent->Profiler->seed();

            $dbstats = $this->_Parent->Database->getStatistics();
            $queries = $dbstats['queries'];

            $ds = $pool[$handle];
            $ds->processParameters(array('env' => $this->_env, 'param' => $this->_param));

            if($xml = $ds->grab($this->_env['pool'])):
                if(is_object($xml)) $wrapper->appendChild($xml);
                else $wrapper->setValue($wrapper->getValue() . self::CRLF . '   ' . trim($xml));

            endif;

            $dbstats = $this->_Parent->Database->getStatistics();
            $queries = $dbstats['queries'] - $queries;

            $this->_Parent->Profiler->sample($handle, PROFILE_LAP, 'Datasource', $queries);

            unset($ds);

        }
    }

Essentially the change was:

  • make the function public
  • add $param as a third arument
  • set the arrays a few lines down from there

Is that all that is required?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.