PageList block - 404 error with $view->action()

Permalink 8 8 Browser Info Environment
Hi,

I want to customize the PageList block (with an additional search bar which requires a new action).

In my BASE_URL/application/blocks/page_list/view.php, I have:
<form class="form-wrapper cf" action="<?php echo $view->action('customised') ?>" method="post" enctype="multipart/form-data">

The generated form action URL seems correct: BASE_URL/page/customised/{bID}

In my BASE_URL/application/blocks/page_list/controller.php, I have:
<?php
namespace Application\Block\PageList;
use Concrete\Block\PageList\Controller as PageListBlockController;
class Controller extends PageListBlockController{
public function action_customised($bID = false){
   $this->view();
}
}

The extend is working since I can add other functions which work.

But for an unknown reason, I always get a 404 error (Page not found) when I submit my form with the defined action (BASE_URL/page/customised/{bID}).

I have also tried to call a default action found in the "page_list" controller... I also get a 404.
I have also tried to duplicate the view/controller to the "content" block and... everything is working fine!
It seems to be related to the "page_list" block (at least).

Thank you in advance for your help!
Cheers,
marc


Status: New
marcsublet
marcsublet replied on at Permalink Reply
marcsublet

concrete5 Environment Information

# concrete5 Version
Core Version - 8.2.1
Version Installed - 8.2.1
Database Version - 20170802000000

# concrete5 Packages
Fileset Attribute (0.7)

# concrete5 Overrides
blocks/autonav/templates/nav_main.php, blocks/autonav/templates, blocks/autonav, blocks/switch_language/view.php, blocks/switch_language, blocks/content/templates/main_intro.php, blocks/content/templates, blocks/content, blocks/page_list/templates/collection/view.css, blocks/page_list/templates/collection/view.php, blocks/page_list/templates/collection, blocks/page_list/templates, blocks/page_list/controller.php, blocks/page_list, themes/jkf/default.php, themes/jkf/description.txt, themes/jkf/drawing.php, themes/jkf/full.php, themes/jkf/includes/css/jkf-fonts.css, themes/jkf/includes/css/jkf-global.css, themes/jkf/includes/css/reset.css, themes/jkf/includes/css, themes/jkf/includes/elements/header.php, themes/jkf/includes/elements, themes/jkf/includes/fonts/jkf.eot, themes/jkf/includes/fonts/jkf.svg, themes/jkf/includes/fonts/jkf.ttf, themes/jkf/includes/fonts/jkf.woff, themes/jkf/includes/fonts/newzald-bold.eot, themes/jkf/includes/fonts/newzald-bold.svg, themes/jkf/includes/fonts/newzald-bold.woff, themes/jkf/includes/fonts/newzald-bold.woff2, themes/jkf/includes/fonts/newzald.eot, themes/jkf/includes/fonts/newzald.svg, themes/jkf/includes/fonts/newzald.woff, themes/jkf/includes/fonts/newzald.woff2, themes/jkf/includes/fonts, themes/jkf/includes/images/fondation-jan-krugier.png, themes/jkf/includes/images, themes/jkf/includes/js/css3-mediaqueries.js, themes/jkf/includes/js/jkf-script.js, themes/jkf/includes/js/jquery.elevateZoom-3.0.8.min.js, themes/jkf/includes/js, themes/jkf/includes, themes/jkf/page_theme.php, themes/jkf/redirection.php, themes/jkf/thumbnail.png, themes/jkf/view.php, themes/jkf

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
5.6.22

# PHP Extensions
amf, bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, http, iconv, id3, imap, intl, ionCube Loader, json, ldap, libxml, mailparse, mbstring, mcrypt, mhash, ming, mysql, mysqli, mysqlnd, OAuth, openssl, pcre, PDFlib, PDO, pdo_mysql, pdo_sqlite, pgsql, Phar, posix, propro, raphf, Reflection, session, SimpleXML, soap, SourceGuardian, SPL, SPPLUS, sqlite3, ssh2, standard, tidy, timezonedb, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaz, Zend Guard Loader, zip, zlib

# PHP Settings
max_execution_time - 60
log_errors_max_len - 1024
max_file_uploads - 100
max_input_nesting_level - 64
max_input_time - 0
max_input_vars - 1000
memory_limit - 640M
post_max_size - 300M
sql.safe_mode - Off
upload_max_filesize - 300M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
raphf.persistent_handle.limit - -1
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38