Code Monkey home page Code Monkey logo

faqs's Issues

FAQ名が空欄の場合のメッセージ

FAQ名を空欄で登録しようとすると、
メッセージ「FAQを入力してください」が出力されます。
⇒「FAQ名を入力してください」のほうが望ましいかとおもいます。

FaqQuestionのadd,editは成功するが、deleteで失敗する

掲題の現象をみつけました。解析して修正箇所がみえたので、お伝えします。

add) 成功
http://127.0.0.1:9090/faqs/faq_questions/add/5?frame_id=11

edit) 成功
http://127.0.0.1:9090/faqs/faq_questions/edit/5/251f1e45247b9232596607fcafb89906?frame_id=11

delete) cakeが生成されたURLが間違っているため、失敗。
http://127.0.0.1:9090/faqs/faq_questions/faqs/faq_questions/delete/5/c7c9d6b0598c0ef27f20f6293f99f23c?frame_id=11/29

解析した結果、修正すべきソースは以下とおもわれる。)
/var/www/app/app/Plugin/Faqs/View/Elements/FaqQuestions/delete_form.ctp

修正前)

NetCommonsForm->create('FaqQuestion', array( 'type' => 'delete', 'controller' => 'faq_questions', ★controllerはactionUrl()の中で書いてるのでここでは不要 'action' => NetCommonsUrl::actionUrl(array( ★actionではなくurl 'controller' => $this->params['controller'], 'action' => 'delete', 'block_id' => Current::read('Block.id'), 'frame_id' => Current::read('Frame.id'), 'key' => h($this->data['FaqQuestion']['key']) )) )); ?>

修正後)

NetCommonsForm->create('FaqQuestion', array( 'type' => 'delete', 'url' => NetCommonsUrl::actionUrl(array( 'controller' => $this->params['controller'], 'action' => 'delete', 'block_id' => Current::read('Block.id'), 'frame_id' => Current::read('Frame.id'), 'key' => h($this->data['FaqQuestion']['key']) )) )); ?>

>これで、生成urlがなおり、正しく削除できました。
http://127.0.0.1:9090/faqs/faq_questions/delete/5/c7c9d6b0598c0ef27f20f6293f99f23c?frame_id=11

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.