ParseError
syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting '(' ParseError thrown with message "syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting '('" Stacktrace: #12 ParseError in rex:///module/20/output:29 #11 require in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content.php:123 #10 rex_article_content:getArticle in rex:///template/8:5 #9 require in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:460 #8 rex_article_content_base:{closure} in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php:63 #7 rex_timer:measure in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php:461 #6 rex_article_content_base:getArticleTemplate in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/boot.php:60 #5 rex_package:{closure} in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php:52 #4 rex_extension:{closure} in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php:63 #3 rex_timer:measure in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php:63 #2 rex_extension:registerPoint in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/frontend.php:26 #1 require in /home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/boot.php:143 #0 require in /home/httpd/vhosts/kommunisten.ch/httpdocs/index.php:9
Stack frames (13)
12
ParseError
rex:///module/20/output29
11
require
/redaxo/src/addons/structure/plugins/content/lib/article_content.php123
10
rex_article_content getArticle
rex:///template/85
9
require
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php460
8
rex_article_content_base {closure}
/redaxo/src/core/lib/util/timer.php63
7
rex_timer measure
/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php461
6
rex_article_content_base getArticleTemplate
/redaxo/src/addons/structure/plugins/content/boot.php60
5
rex_package {closure}
/redaxo/src/core/lib/extension.php52
4
rex_extension {closure}
/redaxo/src/core/lib/util/timer.php63
3
rex_timer measure
/redaxo/src/core/lib/extension.php63
2
rex_extension registerPoint
/redaxo/src/core/frontend.php26
1
require
/redaxo/src/core/boot.php143
0
require
/index.php9
      if(1260 != $thearticle->getValue('id')){ //Selbstauflistung unterbinden
           //Startartikel
           if($withstartpage == '1' || $thearticle->getValue('startpage') != '1'){
              //Teaser
         if(($onlyteaser != '1' && $onlyteaser != '3') || $thearticle->getValue('teaser') == '1'){
            //Datum: online_from / online_to
            if($metatime != '1' || ($thearticle->getValue('online_from') <= date('U') && $thearticle->getValue('online_to') >= date('U'))){
               $show_articles[] = $thearticle;
            }
         }
           }
      }
   }
   return $show_articles;
}
}

// Sortierfunktion
if(!function_exists("sortArticlesBy" . /* REX_VALUE[5] */ '' . "" . /* REX_VALUE[6] */ '0')){
function sortArticlesBy/* REX_VALUE[5] */ ''()/* REX_VALUE[6] */ '0'( $artA, $artB) {

   $sortby = /* REX_VALUE[5] */ '';

//name, createdate, updatedate, online_from, online_to, prior

   $createA = $artA->getValue($sortby);
   $createB = $artB->getValue($sortby);

   if ( $createA == $createB) {
      return 0;
   }

   if(/* REX_VALUE[6] */ '0') return $createA > $createB ? -1 : 1;
   else  return $createA < $createB ? -1 : 1;
}
}

if(!function_exists("generatePagination")){
function generatePagination($articles, $listpage='0', $itemsperpage, $listnum){

Arguments
  1. "syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting '('"
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content.php
        // bc
        if ($this->viasql) {
            return parent::getArticle($curctype);
        }
 
        $this->ctype = $curctype;
 
        if (!$this->getSlice && 0 != $this->article_id) {
            // article caching
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $articleContentFile = rex_path::addonCache('structure', $this->article_id . '.' . $this->clang . '.content');
 
                if (!is_file($articleContentFile)) {
                    rex_content_service::generateArticleContent($this->article_id, $this->clang);
                }
 
                require $articleContentFile;
            } finally {
                $CONTENT = ob_get_clean();
                assert(is_string($CONTENT));
            }
        } else {
            // Inhalt ueber sql generierens
            $CONTENT = parent::getArticle($curctype);
        }
 
        return rex_extension::registerPoint(new rex_extension_point('ART_CONTENT', $CONTENT, [
            'ctype' => $curctype,
            'article' => $this,
        ]));
    }
 
    public function getCurrentSlice(): rex_article_slice
    {
        if ($this->viasql) {
            return parent::getCurrentSlice();
        }
<?= /* REX_TEMPLATE[14] */ rex_var_template::getTemplateOutput(14, new rex_timer(), require rex_var_template::getTemplateStream(14, $this)), "\r\n" ?>

        <aside>
<?php 
    print $this->getArticle(2); 
?>

<?= /* REX_TEMPLATE[15] */ rex_var_template::getTemplateOutput(15, new rex_timer(), require rex_var_template::getTemplateStream(15, $this)) ?>
Arguments
  1. 2
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php
    }
 
    // ----- Template inklusive Artikel zurückgeben
 
    /**
     * @return string
     */
    public function getArticleTemplate()
    {
        if (0 != $this->template_id && 0 != $this->article_id) {
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $TEMPLATE = new rex_template($this->template_id);
 
                rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
                    $tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
 
                    require rex_stream::factory('template/' . $this->template_id, $tplContent);
                });
            } finally {
                $CONTENT = ob_get_clean();
            }
 
            return $this->replaceLinks($CONTENT);
        }
 
        return 'no template';
    }
 
    /**
     * @param string $path
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
    {
        if (!$this->eval) {
            $key = 'EOD_' . strtoupper(sha1((string) time()));
Arguments
  1. "rex:///template/8"
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php
     *
     * On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
     *
     * @template T
     *
     * @param string $label
     * @param callable():T $callable
     *
     * @return T result of callable
     */
    public static function measure($label, callable $callable)
    {
        if (!rex::isDebugMode()) {
            return $callable();
        }
 
        $timer = new self();
 
        try {
            return $callable();
        } finally {
            $timer->stop();
 
            self::measured($label, $timer);
        }
    }
 
    /**
     * Saves the measurement of the given timer.
     *
     * This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
     */
    public static function measured(string $label, self $timer): void
    {
        $duration = self::$serverTimings[$label]['sum'] ?? 0;
        $duration += $timer->getDelta(self::MILLISEC);
 
        self::$serverTimings[$label]['sum'] = $duration;
        self::$serverTimings[$label]['timings'][] = [
            'start' => $timer->start,
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php
 
    // ----- Template inklusive Artikel zurückgeben
 
    /**
     * @return string
     */
    public function getArticleTemplate()
    {
        if (0 != $this->template_id && 0 != $this->article_id) {
            ob_start();
            try {
                ob_implicit_flush(0);
 
                $TEMPLATE = new rex_template($this->template_id);
 
                rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
                    $tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
 
                    require rex_stream::factory('template/' . $this->template_id, $tplContent);
                });
            } finally {
                $CONTENT = ob_get_clean();
            }
 
            return $this->replaceLinks($CONTENT);
        }
 
        return 'no template';
    }
 
    /**
     * @param string $path
     * @param string $content
     * @return string
     */
    protected function getStreamOutput($path, $content)
    {
        if (!$this->eval) {
            $key = 'EOD_' . strtoupper(sha1((string) time()));
            return "require rex_stream::factory('$path', <<<'$key'\n$content\n$key);\n";
Arguments
  1. "Template: 8"
    
  2. Closure() {#92 …4}
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/boot.php
        $content = $ep->getSubject();
 
        $article = new rex_article_content();
        $article->setCLang(rex_clang::getCurrentId());
 
        if (!$article->setArticleId(rex_article::getCurrentId())) {
            if (!rex::isDebugMode() && !rex_backend_login::hasSession()) {
                throw new rex_exception('Article with id '.rex_article::getCurrentId().' does not exist');
            }
 
            $fragment = new rex_fragment([
                'content' => '<p><b>Article with ID '.rex_article::getCurrentId().' not found.</b><br />If this is a fresh setup, an article must be created first.<br />Enter <a href="' . rex_url::backendController() . '">REDAXO</a>.</p>',
            ]);
            $content .= $fragment->parse('core/fe_ooops.php');
            rex_response::sendPage($content);
            exit;
        }
 
        try {
            $content .= $article->getArticleTemplate();
        } catch (rex_article_not_found_exception $exception) {
            $article = new rex_article_content();
            $article->setCLang(rex_clang::getCurrentId());
            $article->setArticleId(rex_article::getNotfoundArticleId());
 
            $content .= $article->getArticleTemplate();
        }
 
        $artId = $article->getArticleId();
        if ($artId == rex_article::getNotfoundArticleId() && $artId != rex_article::getSiteStartArticleId()) {
            rex_response::setStatus(rex_response::HTTP_NOT_FOUND);
        }
 
        // ----- inhalt ausgeben
        rex_response::sendPage($content, $article->getValue('updatedate'));
    });
}
 
rex_extension::register('EDITOR_URL', static function (rex_extension_point $ep) {
    static $urls = [
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php
     */
    public static function registerPoint(rex_extension_point $extensionPoint)
    {
        if ($factoryClass = static::getExplicitFactoryClass()) {
            return $factoryClass::registerPoint($extensionPoint);
        }
 
        $name = $extensionPoint->getName();
 
        rex_timer::measure('EP: '.$name, static function () use ($extensionPoint, $name) {
            foreach ([self::EARLY, self::NORMAL, self::LATE] as $level) {
                if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
                    continue;
                }
 
                foreach (self::$extensions[$name][$level] as $extensionAndParams) {
                    [$extension, $params] = $extensionAndParams;
                    $extensionPoint->setExtensionParams($params);
                    /** @var T|null $subject */
                    $subject = call_user_func($extension, $extensionPoint);
                    // Update subject only if the EP is not readonly and the extension has returned something
                    if ($extensionPoint->isReadonly()) {
                        continue;
                    }
                    if (null === $subject) {
                        continue;
                    }
                    $extensionPoint->setSubject($subject);
                }
            }
        });
 
        return $extensionPoint->getSubject();
    }
 
    /**
     * Registers an extension for an extension point.
     *
     * @param string|string[] $extensionPoint Name(s) of extension point(s)
     * @param callable        $extension      Callback extension
Arguments
  1. rex_extension_point {#74}
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php
     *
     * On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
     *
     * @template T
     *
     * @param string $label
     * @param callable():T $callable
     *
     * @return T result of callable
     */
    public static function measure($label, callable $callable)
    {
        if (!rex::isDebugMode()) {
            return $callable();
        }
 
        $timer = new self();
 
        try {
            return $callable();
        } finally {
            $timer->stop();
 
            self::measured($label, $timer);
        }
    }
 
    /**
     * Saves the measurement of the given timer.
     *
     * This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
     */
    public static function measured(string $label, self $timer): void
    {
        $duration = self::$serverTimings[$label]['sum'] ?? 0;
        $duration += $timer->getDelta(self::MILLISEC);
 
        self::$serverTimings[$label]['sum'] = $duration;
        self::$serverTimings[$label]['timings'][] = [
            'start' => $timer->start,
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php
                if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
                    continue;
                }
 
                foreach (self::$extensions[$name][$level] as $extensionAndParams) {
                    [$extension, $params] = $extensionAndParams;
                    $extensionPoint->setExtensionParams($params);
                    /** @var T|null $subject */
                    $subject = call_user_func($extension, $extensionPoint);
                    // Update subject only if the EP is not readonly and the extension has returned something
                    if ($extensionPoint->isReadonly()) {
                        continue;
                    }
                    if (null === $subject) {
                        continue;
                    }
                    $extensionPoint->setSubject($subject);
                }
            }
        });
 
        return $extensionPoint->getSubject();
    }
 
    /**
     * Registers an extension for an extension point.
     *
     * @param string|string[] $extensionPoint Name(s) of extension point(s)
     * @param callable        $extension      Callback extension
     * @param self::*         $level          Runlevel (`rex_extension::EARLY`, `rex_extension::NORMAL` or `rex_extension::LATE`)
     * @param array           $params         Additional params
     * @return void
     *
     * @template T as rex_extension_point
     * @psalm-param callable(T):mixed $extension
     */
    public static function register($extensionPoint, callable $extension, $level = self::NORMAL, array $params = [])
    {
        if ($factoryClass = static::getExplicitFactoryClass()) {
            $factoryClass::register($extensionPoint, $extension, $level, $params);
Arguments
  1. "EP: FE_OUTPUT"
    
  2. Closure() {#75 …3}
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/frontend.php
if (rex::isSetup()) {
    rex_response::sendRedirect(rex_url::backendController());
}
 
if (rex::isDebugMode()) {
    header('X-Robots-Tag: noindex, nofollow, noarchive');
}
 
// ----- INCLUDE ADDONS
include_once rex_path::core('packages.php');
 
// ----- caching end für output filter
$CONTENT = ob_get_clean();
 
// trigger api functions. the api function is responsible for checking permissions.
rex_api_function::handleCall();
 
if (rex_extension::isRegistered('FE_OUTPUT')) {
    // ----- EXTENSION POINT
    rex_extension::registerPoint(new rex_extension_point('FE_OUTPUT', $CONTENT));
} else {
    // ----- inhalt ausgeben
    rex_response::sendPage($CONTENT);
}
 
Arguments
  1. rex_extension_point {#74}
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/boot.php
    $clangId = rex_request('clang', 'int', rex_clang::getStartId());
    if (rex::isBackend() || rex_clang::exists($clangId)) {
        rex_clang::setCurrentId($clangId);
    }
}
 
// ----------------- HTTPS REDIRECT
if ('cli' !== PHP_SAPI && !rex::isSetup()) {
    if ((true === rex::getProperty('use_https') || rex::getEnvironment() === rex::getProperty('use_https')) && !rex_request::isHttps()) {
        rex_response::enforceHttps();
    }
 
    if (true === rex::getProperty('use_hsts') && rex_request::isHttps()) {
        rex_response::setHeader('Strict-Transport-Security', 'max-age='.rex::getProperty('hsts_max_age', 31536000)); // default 1 year
    }
}
 
if (isset($REX['LOAD_PAGE']) && $REX['LOAD_PAGE']) {
    unset($REX);
    require rex_path::core(rex::isBackend() ? 'backend.php' : 'frontend.php');
}
 
Arguments
  1. "/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/frontend.php"
    
/home/httpd/vhosts/kommunisten.ch/httpdocs/index.php
<?php
 
unset($REX);
$REX['REDAXO'] = false;
$REX['HTDOCS_PATH'] = './';
$REX['BACKEND_FOLDER'] = 'redaxo';
$REX['LOAD_PAGE'] = true;
 
require $REX['BACKEND_FOLDER'] . '/src/core/boot.php';
 
Arguments
  1. "/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/boot.php"
    

Environment & details:

Key Value
article_id
"1260"
empty
empty
empty
empty
Key Value
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
PP_CUSTOM_PHP_INI
"/home/httpd/vhosts/system/kommunisten.ch/etc/php.ini"
PP_CUSTOM_PHP_CGI_INDEX
"plesk-php73-fastcgi"
HTTP_CONNECTION
"close"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/index.php?article_id=1260"
QUERY_STRING
"article_id=1260"
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REMOTE_PORT
"47654"
SCRIPT_FILENAME
"/home/httpd/vhosts/kommunisten.ch/httpdocs/index.php"
SERVER_ADMIN
"root@localhost"
CONTEXT_DOCUMENT_ROOT
"/home/httpd/vhosts/kommunisten.ch/httpdocs"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/home/httpd/vhosts/kommunisten.ch/httpdocs"
REMOTE_ADDR
"54.221.110.87"
SERVER_PORT
"443"
SERVER_ADDR
"80.74.132.2"
SERVER_NAME
"kommunisten.ch"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
""
HTTP_HOST
"kommunisten.ch"
HTTP_REFERER
"http://www.kommunisten.ch/index.php?article_id=1260"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
SSL_TLS_SNI
"kommunisten.ch"
HTTPS
"on"
PERL5LIB
"/usr/share/awstats/lib:/usr/share/awstats/plugins"
SCRIPT_URI
"https://kommunisten.ch/index.php"
SCRIPT_URL
"/index.php"
UNIQUE_ID
"ZgYePRwgV-Pdj8Z66BrbqgAAAAw"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711676989.9629
REQUEST_TIME
1711676989
empty
0. Whoops\Handler\PrettyPageHandler
Report a REDAXO bug