Block duplicate function has a serious bug

Permalink Browser Info Environment
public function duplicate in block controller sends wrong array values. So if i made any custom template and select that template block values for items in btVividSimpleSlide becomes null.

function should be changed for row values instead of args like:

public function duplicate($newBID) {
        parent::duplicate($newBID);
        $db = Loader::db();
        $v = array($this->bID);
        $q = 'select * from btVividSimpleSlide where bID = ?';
        $r = $db->query($q, $v);
        while ($row = $r->FetchRow()) {
            $vals = array(
                $newBID,
                $row['title'],
                $row['slidedesc'],
                $row['btnText'],
                $row['fID'],
                $row['pageID'],
                $row['sort']


Being said that, thanks for sharing this block as a feed add-on.

Type: Discussion
Status: Resolved
tolga
View Replies:
MichaelG replied on at Permalink Reply
MichaelG
Whoops! You are correct. Thanks for pointing that out. Just pushed an update with that fix.

concrete5 Environment Information

# concrete5 Version
5.7.2.1

# concrete5 Packages
Block Designer (0.9.8), Share Me (0.9.1), Simple Slider (0.9.2), Vivid Carousel (1.0), Vivid Simple Accordion (1.0), Zoomer (1.0).

# concrete5 Overrides
blocks/autonav, blocks/content_heading, blocks/feature, blocks/horizontal_rule, blocks/image, blocks/image_slider, blocks/page_list, blocks/rss_displayer, blocks/search, blocks/social_links, blocks/testimonial, blocks/testimonials_carousel, blocks/vivid_simple_accordion, blocks/weather, elements/footer_required.php, elements/header_required.php, js/cube-portfolio, languages/da_DK, languages/de_DE, languages/el_GR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nl_NL, languages/ru_RU, languages/sl_SI, languages/sv_SE, languages/tr_TR, themes/es

# 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
apache2handler

# PHP Version
5.5.10

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, yaz, Zend Debugger, zip, zlib.

# PHP Settings
max_execution_time - 90
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 32M
sql.safe_mode - Off
upload_max_filesize - 32M
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
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
zend_debugger.max_msg_size - 2097152
zend_debugger.tunnel_max_port - 65535

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.