2017-11-30 3 views
0

Typo3을 버전 4에서 버전 7로 업그레이드했고 더 이상 Ajax 끝 점이 작동하지 않으면 문서화되지 않은 사람이 누구인지 알고 있습니다. typoscript에서 간단한 아약스 종점 정의의 사용법이 바뀌 었습니까? 요청 URL이 이제 달라질 수 있습니까?Typo3을 버전 4.x에서 7.x로 업그레이드 한 후 Ajax 끝점이 더 이상 작동하지 않습니다

원래의 정의는 다음과 같습니다 컨트롤러는 단순화 된 버전에서 다음과 같이 찾고

tx_courses_ajax = PAGE 
tx_courses_ajax { 
    typeNum = 1337 
    10 = USER 
    10 { 
     #userFunc = tx_extbase_core_bootstrap->run 
     userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run 
     extensionName = courses 
     pluginName = calendar 
     switchableControllerActions { 
      Seminars { 
       1 = getEvent 
       2 = calendar 
       3 = getEvents 
      } 
     } 
     settings =< plugin.tx_courses.settings 
     persistence =< plugin.tx_courses.persistence 
     view =< plugin.tx_courses.view 
    } 
    config { 
     disableAllHeaderCode = 1 
     xhtml_cleaning = 0 
     admPanel = 0 
     debug = 1 
     no_cache = 1 
     tx_realurl_enable = 0 
     additionalHeaders = Content-type: application/json 
    } 

    10 < tt_content.list.20.tx_courses_ajax 
} 

:

class Tx_Kurse_Controller_SeminareController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { 
    public function calendarAction() { 
     $calenderCgf = '...'; 
     file_put_contents($docroot.'uploads/jquery.fullcalendar-mini.js', $calenderCgf); 
    } 

    /** 
    * @return void 
    */ 
    public function getEventAction() { 
     $requestParams = $this->request->getArguments(); 

     print_r($requestParams); 
    } 

    /** 
    * @param string $start Y-M-D H:i:s 
    * @param string $end Y-M-D H:i:s 
    * 
    * @return string $seminarText 
    */ 
    public function getEventsAction($start, $end) { 
     $start = new DateTime($start); 
     $end = new DateTime($end); 
     $seminars = $this->seminarsRepository->findEventsInPeriod($start, $end); 
     $requestParams = $this->request->getArguments(); 

     print_r($requestParams); 
    } 

    /** 
    * @param int $seminar 
    * @return void 
    */ 
    public function bindingAction($seminar) { 
     $seminars = $this->seminareRepository->findByUid($seminar); 
     $this->view->assign('seminars', $seminars); 
    } 
} 

원래의 요청 URL은 다음과 같습니다

인덱스입니다. PHP? id = 176 & no_cache = 1 & tx_courses_calendar [컨트롤러] = 세미나 & tx_courses_calendar [동작] = & tx_courses_calendar [START = 2017년 1월 1일 % 2,000 바인딩 : 59 : 59 & TYPE = 1,337

I 00 : 00 2,023 & tx_courses_calendar [END] = 2017년 12월 30일 %를

<!-- Parsetime: 42ms --> 

을 따라서는 typoscript 정의가 작동하는 것 같다,하지만 뭔가 :(잘못

UPDATE 것 같습니다 : 만 디버그 모드에서 요청 결과로 얻을 나는 해결책을 발견했습니다

버전 4와 동일하지 않기 때문에 제거해야하며 (더 이상 필요하지 않음) 오류 메시지와 함께 응답을 받았습니다. 메시지는이 컨트롤러에 대해 원하는 동작을 사용할 수 없다고 말했습니다. 그 후 나는 더 깊숙이 파고 들었고 Extension-Name은 첫 글자를 대문자로 구성해야합니다. 그렇지 않으면 작동하지 않습니다.

+0

나 혼자서 해결책을 찾았으며 해결책을 초기 게시물의 맨 아래에 추가했습니다. – oVi

답변

0

짐작할 만하지만 어쩌면 vendorName이 구성에 없습니다.

+0

이 속성을 추가했지만 문제가 아닙니다. – oVi

관련 문제