• 04-09-2018, 14:18:09
    #1
    Merhaba,
    Xenforo 2 ye güncelleme yaptık. 1 deki eklentileri de 2 ye aktarıyoruz. Sms doğrulaması yapan bir eklenti var, kurduk. Fakat aşağıdaki hatayı alıyoruz. Bu hatayı nasıl düzeltebiliriz ?
    • Error: Call to undefined method XFMvcReplyError::setParam()
    • src/addons/XenForoTurkiye/SMS/XF/Pub/Controller/Thread.php:16
  • 05-09-2018, 10:21:04
    #2
    KR@LKSK adlı üyeden alıntı: mesajı görüntüle
    Merhaba,
    Xenforo 2 ye güncelleme yaptık. 1 deki eklentileri de 2 ye aktarıyoruz. Sms doğrulaması yapan bir eklenti var, kurduk. Fakat aşağıdaki hatayı alıyoruz. Bu hatayı nasıl düzeltebiliriz ?
    • Error: Call to undefined method XFMvcReplyError::setParam()
    • src/addons/XenForoTurkiye/SMS/XF/Pub/Controller/Thread.php:16

    Thread.php dosyasının 16. satırındaki if metodunu aşağıdaki kod ile değiştirir misiniz?


            
      if( !method_exists($smsLimitThreadReply, 'smsLimitThreadReply') ) {
      return $smsLimitThreadReply;
    }
    Şöyle olması gerekiyor tüm fonksiyonun;

        public function actionIndex(ParameterBag $params)
        {
            $response = parent::actionIndex($params);
    
            $visitor = \XF::visitor();
    
             if( !method_exists($smsLimitThreadReply, 'smsLimitThreadReply') ) {
      return $smsLimitThreadReply; 
    
            $response->setParam('smsLimitThreadReply', $this->checkLimitThreadReply($visitor, $params));
    
            return $response;
        }
  • 05-09-2018, 14:51:14
    #3
    scout adlı üyeden alıntı: mesajı görüntüle
    Thread.php dosyasının 16. satırındaki if metodunu aşağıdaki kod ile değiştirir misiniz?


            
      if( !method_exists($smsLimitThreadReply, 'smsLimitThreadReply') ) {
      return $smsLimitThreadReply;
    }
    Şöyle olması gerekiyor tüm fonksiyonun;

        public function actionIndex(ParameterBag $params)
        {
            $response = parent::actionIndex($params);
    
            $visitor = XF::visitor();
    
             if( !method_exists($smsLimitThreadReply, 'smsLimitThreadReply') ) {
      return $smsLimitThreadReply;
    
            $response->setParam('smsLimitThreadReply', $this->checkLimitThreadReply($visitor, $params));
    
            return $response;
        }
    Söylediğiniz değişikliği yaptığımızda istenilen sayfa bulunamadı hatası alıyoruz.

    Dosyanın ilk 50 satırı aşağıdaki gibi


    <?php
    
    namespace XenForoTurkiyeSMSXFPubController;
    
    use XFMvcFormAction;
    use XFMvcParameterBag;
    
    class Thread extends XFCP_Thread
    {
        public function actionIndex(ParameterBag $params)
        {
            $response = parent::actionIndex($params);
    
            $visitor = XF::visitor();
           
            $response->setParam('smsLimitThreadReply', $this->checkLimitThreadReply($visitor, $params));
    
            return $response;
        }
    
    public function actionAddReply(ParameterBag $params)
        {
            $response = parent::actionAddReply($params);
            $visitor = XF::visitor();
           
            if($visitor['user_id'] == 0)
                return $response;
           
            if ($this->checkLimitThreadReply($visitor, $params))
                return $this->error(XF::phrase('xenforoturkiye_sms_need_verification', ['link' => $this->buildLink('account/sms')]));
           
            return $response;
        }
    
        public function actionReply(ParameterBag $params)
        {
            $response = parent::actionReply($params);
            $visitor = XF::visitor();
           
            if($visitor['user_id'] == 0)
                return $response;
    
            if ($this->checkLimitThreadReply($visitor, $params))
                return $this->error(XF::phrase('xenforoturkiye_sms_need_verification', ['link' => $this->buildLink('account/sms')]));
           
            return $response;
        }
    
    // Check if the user already member of sms verified usergroup
  • 05-09-2018, 15:21:43
    #4
    Sırasıyla aşağıdaki uygulamaları yapar mısınız?

    Eklenti aktif halde iken;

    library/config.php dosyasını açalım ve en alt satıra aşağıdaki kodları ekleyelim;

    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';

    Yine aynı şekilde library/config.php dosyasının en alt satırına aşağıdaki kodları ekleyelim;


    $config['cache']['cacheSessions'] = true;
    $config['cache']['backend'] = 'Apc';

    Sonrasında yönetim panelinde admin.php?add-ons/ bölümüne girerek eklentiyi kaldırın. Eklenti dosyalarının tümünü de FTP'den silerek yeni dosyaları ekleyip tekrardan kurulum yapın.


    Kurulum sonrasında config.php dosyasına eklediğimiz kodları silelim.


    Sonucu buradan yazabilirsiniz bir kaç alternatif yöntem daha var. Eğer onlar da çalışmazsa eklenti için güncelleme gerekebilir ki, bunu da eklenti yapımcısı ile görüşmeniz gerekebilir.


    Kolay gelsin.



    KR@LKSK adlı üyeden alıntı: mesajı görüntüle
    Söylediğiniz değişikliği yaptığımızda istenilen sayfa bulunamadı hatası alıyoruz.

    Dosyanın ilk 50 satırı aşağıdaki gibi


    <?php
    
    namespace XenForoTurkiyeSMSXFPubController;
    
    use XFMvcFormAction;
    use XFMvcParameterBag;
    
    class Thread extends XFCP_Thread
    {
        public function actionIndex(ParameterBag $params)
        {
            $response = parent::actionIndex($params);
    
            $visitor = XF::visitor();
           
            $response->setParam('smsLimitThreadReply', $this->checkLimitThreadReply($visitor, $params));
    
            return $response;
        }
    
    public function actionAddReply(ParameterBag $params)
        {
            $response = parent::actionAddReply($params);
            $visitor = XF::visitor();
           
            if($visitor['user_id'] == 0)
                return $response;
           
            if ($this->checkLimitThreadReply($visitor, $params))
                return $this->error(XF::phrase('xenforoturkiye_sms_need_verification', ['link' => $this->buildLink('account/sms')]));
           
            return $response;
        }
    
        public function actionReply(ParameterBag $params)
        {
            $response = parent::actionReply($params);
            $visitor = XF::visitor();
           
            if($visitor['user_id'] == 0)
                return $response;
    
            if ($this->checkLimitThreadReply($visitor, $params))
                return $this->error(XF::phrase('xenforoturkiye_sms_need_verification', ['link' => $this->buildLink('account/sms')]));
           
            return $response;
        }
    
    // Check if the user already member of sms verified usergroup