Page Field Type get recent version of the page, but it should get active version

Permalink Browser Info Environment
When I changed some attribute values of the page and set the schedule publishing for that page, blocks made by Block Developer showed recent values immediately. I think this is a bug, the blocks should get active version instead. Please change CorePage::getByID($cID) to CorePage::getByID($cID, 'ACTIVE').

protected function getPageObject($cID = null)
    {
        $page = false;
        if (is_numeric($cID) && $cID > 0 && ($po = CorePage::getByID($cID)) && !$po->isError() && !$po->isInTrash()) {
            $page = $po;
        }
        return $page;
    }

Type: Ticket
Status: In Progress
concrete5cojp
View Replies:
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

This is a good observation and just updated this in the code, so you can upgrade to the latest version. The same thing was happening in Block Designer (if you're using this), also updated it there in case you also use it.

Thanks for notifying and adding the code, helps a lot once again!

Kind regards
Ramon

concrete5 Environment Information

# Concrete Version
Core Version - 9.1.3
Version Installed - 9.1.3
Database Version - 20220908074900

# Hostname
XXX

# Environment
develop

# Database Information
Version: 10.5.10-MariaDB
SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Advanced HTML Block (1.1.1), Block Developer (1.4.4), Content Templates for CKEditor (0.1.2), GA Popular Pages (2.1.2), Macareux Advanced Page List (1.2.0-b4), Macareux Clear Empty Workflow (0.0.1), Macareux Content Importer (0.7.1), Macareux Remote Cache Cleaner (0.0.2), Mitsumura Tosho (0.3.1), Multiple-Step Workflow (2.0.0a1), Open Graph Tags Lite (2.1.6), S3 Storage (3.1.1), Toolbar Block Outline (0.9.2)

# Concrete Overrides
blocks/accordion/controller.php, blocks/accordion/edit.php, blocks/accordion, blocks/breadcrumbs/controller.php, blocks/breadcrumbs, blocks/content/add.php, blocks/content/edit.php, blocks/content/templates/no_style.php, blocks/content/templates, blocks/content/view.php, blocks/content, blocks/core_container/controller.php, blocks/core_container, blocks/next_previous/controller.php, blocks/next_previous, blocks/topic_list/controller.php, blocks/topic_list, controllers/dialog/tree/node/file_folder/add.php, controllers/dialog/tree/node/file_folder, controllers/dialog/tree/node, controllers/dialog/tree, controllers/dialog, src/Concrete/Cache/Page/FilePageCache.php, src/Concrete/Cache/Page, src/Concrete/Cache, src/Concrete, src/Utility/Service/Text.php, src/Utility/Service, src/Utility

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

# Server Software
nginx/1.22.0

# Server API
fpm-fcgi

# PHP Version
8.1.14

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 60
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 256M
post_max_size - 32M
upload_max_filesize - 32M
zend.exception_string_param_max_len - 15
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 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 may not request a refund that is not currently owned by you.