+
(RE)GENERATION AL CASTELLO DEL CATAJO
Al Castello del Catajo due inediti live serali e tante esperienze coinvolgenti da non perdere!
RuntimeException
Stack frames (11)
10
RuntimeException
…/vendor/wmindsrl/common/src/EntityCMS/bin/appLoader.php:30
9
Wmind\Common\EntityCMS\bin\appLoader
__construct
…/vendor/wmindsrl/common/src/EntityCMS/bin/entitycms.php:68
8
Wmind\Common\EntityCMS\bin\entitycms
initApp
…/vendor/wmindsrl/common/src/EntityCMS/bin/entitycms.php:47
7
Wmind\Common\EntityCMS\bin\entitycms
__construct
…/vendor/wmindsrl/common/src/EntityCMS/entities.php:11
6
Wmind\Common\EntityCMS\entities
__construct
…/modules/index/index.php:178
5
main
…/modules/index/_controller.php:4
4
require_once
…/modules/index/index.php:2
3
require
…/vendor/wmindsrl/common/src/Core/myCms.php:339
2
Wmind\Common\Core\myCms
getModule
…/vendor/wmindsrl/common/src/Core/myCms.php:318
1
Wmind\Common\Core\myCms
run
…/vendor/wmindsrl/common/src/Core/Pages.php:265
0
Wmind\Common\Core\Pages
run
…/wwwroot/index.php:41
/var/www/html/vendor/wmindsrl/common/src/EntityCMS/bin/appLoader.php
public $folder_entity;
public $root_entitydata;
public $root_entitycache;
public $pages;
/**
* Carica la configurazione da file JSON
*
* @param string $appcode Codice dell'app (es: "agrivite")
* @param array $param Parametri di inizializzazione
* @throws \RuntimeException Se il file JSON non esiste o è malformato
*/
public function __construct(string $appcode, array $param = []) {
$this->pages = $param['pages'] ?? null;
// Percorso del file JSON di configurazione
$config_path = $this->getConfigPath($appcode);
if (!file_exists($config_path)) {
throw new \RuntimeException("EntityCMS config file not found: " . $config_path);
}
// Carica e decodifica il JSON
$json_content = file_get_contents($config_path);
$config = json_decode($json_content, true);
if (json_last_error() !== JSON_ERROR_NONE) {
throw new \RuntimeException("Invalid JSON in config file: " . json_last_error_msg());
}
// Imposta le proprietà base
$this->database = $config['database'] ?? null;
$this->table_pre = $config['table_pre'] ?? null;
$this->folder_entity = $config['folder_entity'] ?? null;
// Hardcode delle costanti (come discusso)
$this->root_entitydata = defined('SRC_ENTITYDATA') ? constant('SRC_ENTITYDATA') : null;
$this->root_entitycache = defined('SRC_ENTITYCACHE') ? constant('SRC_ENTITYCACHE') : null;
// Processa categorymap e relationmap
/var/www/html/vendor/wmindsrl/common/src/EntityCMS/bin/entitycms.php
// Update app properties runtime
if(!empty($param['app'])) $this->updateAppRuntime($param['app']);
}
function initApp(?string $app = null) {
$appcode = !empty($app) ? $app : (defined("ENTITYCMS_APP") ? constant("ENTITYCMS_APP") : NULL);
if(empty($appcode)) throw new \UnexpectedValueException("APP not set");
if($this->pages->enabled) {
// Frontend: pages già caricato con load()
$param = ["pages" => $this->pages];
} else {
// Backend: carichiamo con setAppid + load
$this->pages->setAppid($appcode);
$this->pages->load();
$param = ["pages" => $this->pages];
}
$this->app = new appLoader($appcode, $param);
if(empty($this->app->root_entitydata)) throw new \RuntimeException("Root entitydata non impostata (".$app.")");
if(empty($this->app->folder_entity)) throw new \RuntimeException("Folder entitydata non impostata (".$app.")");
$this->src_entitydata = $this->app->root_entitydata.$this->app->folder_entity."/";
if(!empty($this->app->root_entitycache) && is_dir($this->app->root_entitycache.$this->app->folder_entity."/")) {
$this->src_entitycache = $this->app->root_entitycache.$this->app->folder_entity."/";
if(!is_writable($this->src_entitycache)) throw new \RuntimeException("SRC entitycache not writable (".$this->src_entitycache.", ".$app.")");
$this->cache_enabled = true;
}
}
protected function saveCache(string $functionname, array $param, array $data) :void {
if(!$this->cache_enabled) return;
$src = $this->getSrc($functionname, $param);
$jsondata = json_encode($data);
try {
file_put_contents($src,$jsondata);
} catch(\Exception $e) {
throw new \RuntimeException("Unable to write cache file (".$src.")");
/var/www/html/vendor/wmindsrl/common/src/EntityCMS/bin/entitycms.php
var $cache_clear = false;
var $debug;
function __construct(Pages $pages, array $param = []) {
// Initialize validator and sanitizer
$this->validator = new DataValidator();
$this->sanitizer = new DataSanitize();
$this->pages = $pages;
$this->cms = $this->pages->cms;
$this->db = $this->cms->db;
$this->lang = $param['lang'] ?? (empty($this->cms) ? null : $this->cms->getLocale());
if($this->cms->forceclearcache == true) $this->cache_clear = true;
if($this->cms->currentenv == "svil") $this->cache_ttl = 1;
$this->debug = $this->pages->cms->getEnv('DEBUG') ? false : true;
$this->initApp($param['appid'] ?? null);
$this->initTable($this->app->database . '.' . $this->app->table_pre);
// Update app properties runtime
if(!empty($param['app'])) $this->updateAppRuntime($param['app']);
}
function initApp(?string $app = null) {
$appcode = !empty($app) ? $app : (defined("ENTITYCMS_APP") ? constant("ENTITYCMS_APP") : NULL);
if(empty($appcode)) throw new \UnexpectedValueException("APP not set");
if($this->pages->enabled) {
// Frontend: pages già caricato con load()
$param = ["pages" => $this->pages];
} else {
// Backend: carichiamo con setAppid + load
$this->pages->setAppid($appcode);
$this->pages->load();
$param = ["pages" => $this->pages];
}
/var/www/html/vendor/wmindsrl/common/src/EntityCMS/entities.php
<?php
namespace Wmind\Common\EntityCMS;
use \Wmind\Common\Core\Pages;
class entities extends bin\entitycms {
private $param = [];
function __construct(Pages $pages) {
parent::__construct($pages);
}
public function withcategory($categories) :self {
if(!is_array($categories)) $categories = [$categories];
$this->param['category_code'] = $categories;
return $this;
}
public function withcategories(array $categories) :self {
$this->param['category_code'] = $categories;
return $this;
}
public function withrelation(string $relation_code, $entity, bool $inverse = false) :self {
// entity can be string (entity_code) or int (identity) or null (no relation)
//if(empty($entity)) throw new \RuntimeException("Entity for withrelation cannot be empty");
if($entity === null) $this->param['entity_null'] = true; // case null
if(intval($entity)) $this->param['identity'] = intval($entity); // case identity
if(!intval($entity)) $this->param['entity_code'] = $entity; // case entity_code
$this->param['relation_code'] = $relation_code;
$this->param['relation_inverse'] = $inverse;
return $this;
}
public function withparam(string $param_code, $value) :self {
if(empty($this->param['withparam'])) $this->param['withparam'] = [];
$this->param['withparam'][] = ["code" => $param_code, "value" => $value];
/var/www/html/modules/index/index.php
<h3 class="mb-3 title">(RE)GENERATION AL CASTELLO DEL CATAJO </h3>
<p>Al Castello del Catajo due inediti live serali e tante esperienze coinvolgenti da non perdere!</p>
</div>
<div onclick="window.location.href='https://eventi.regenerationfestival.it'" data-background="<?= URL_ASSETS; ?>images/hp_cta_eventi.jpg" style="background-color: rgb(6, 125, 194); min-height: 400px; background-image: url(<?= URL_ASSETS; ?>images/hp_cta_eventi.jpg);" class="col-12 col-lg-6 p-4 d-flex flex-column justify-content-end poi">
<span>+</span>
<img data-src="<?= URL_ASSETS; ?>images/hp_cta_eventi.jpg" src="<?= URL_ASSETS; ?>images/hp_cta_eventi.jpg" alt="Regeneration Festival" class="d-none">
<h3 class="mb-3 title">(RE)GENERATION TRA COLLI E TERME</h3>
<p>Su tutto il territorio euganeo escursioni, nordic walking e bike tour, visite guidate…e molto altro! Ogni evento è pensato per ispirarti.</p>
</div>
</div>
</div>
</section>
<?php
// OSPITI
$ospiti = (new entities($pages))
->withcategory("OSPITI")
->get();
if($ospiti) {
?>
<section class="more-events mt-5 pt-3">
<div class="container">
<div class="row align-items-stretc d-flex ">
<div class="col-12 col-md-6 text-container">
<h2 class="title my-3">Gli ospiti</h2>
<div>
<?=__("HOME subtitle ospiti", "richtext");?>
</div>
</div>
</div>
</div>
<div class="d-flex align-items-center general-events animated" data-animation="fade-in">
<div class="container px-0 px-lg-3">
<div id="carousel-events" class="row">
/var/www/html/modules/index/_controller.php
<?php
global $cms, $pages;
main();
/var/www/html/modules/index/index.php
<?php
require_once(__DIR__ . "/_controller.php");
use Wmind\Common\EntityCMS\entities;
function main() {
global $cms, $pages;
?>
<!doctype html>
<html lang="it-IT">
<head>
<?php $cms->getModule("_include/head");?>
<link rel="stylesheet" href="<?= URL_ASSETS; ?>plugins/slick-carousel/slick.min.css" />
</head>
<body class="page-home">
<?php $cms->getModule("_include/header");?>
<!-- main_content -->
<div id="main-content" role="main" class="main-content">
<div class="wrapper ">
<section id="newFullSlider" class="container-fluid mb-5">
<div class="row h-100 pb-5 text-containerxxx">
<div class="col-12 col-lg-4 text-left animated1 title_wrapper d-none" data-animation="">
<div class="text-box-left">
</div>
</div>
<!-- Captions Carousel -->
<div class="col-9 col-lg-7 d-nonexxx d-lg-blockxxx align-self-center slidesCaptions animated1" data-animation="">
<div class="row">
<div class="col-12 col-lg-11">
<div id="caption_slider" class="d-nonexxx">
<li class="item">
<h5 class="mb-3">TI DIAMO IL BENVENUTO AL (RE)GENERATION FESTIVAL 2024</h5>
/var/www/html/vendor/wmindsrl/common/src/Core/myCms.php
public function getModule(?string $site, bool $root = false) {
if($this->isMaintenance() && $root) {
$this->header503();
} elseif($this->existsSite($site)) {
$module = $this->getSitePath($site);
$appid = $this->appid;
} elseif($root) {
$this->header404();
} else {
throw new \Exception($site . " not exists");
}
if(!is_callable($this->authcallback)) {
return require($module);
}
if(call_user_func($this->authcallback, $site, $appid)) {
return require($module);
} else {
// Check if user is logged in
if($this->user && method_exists($this->user, 'islogged') && !$this->user->islogged()) {
// User is not logged in - redirect to login page with original URL
$originalUrl = $this->currentRequest();
// Include query string if present
if(!empty($this->remoteinfo['querystring'])) {
$originalUrl .= '?' . $this->remoteinfo['querystring'];
}
// Validate redirect URL is internal (security check)
$loginUrl = $this->currentUrl() . "admin/login/index";
if(!empty($originalUrl) && $originalUrl !== "admin/login/index" && $this->isValidRelativeUrl($originalUrl)) {
$loginUrl .= "?redirect=" . urlencode($originalUrl);
}
$this->redirect302($loginUrl);
return;
/var/www/html/vendor/wmindsrl/common/src/Core/myCms.php
public function setAlternate(string $locale, string $url) :void {
$this->alternate[$locale] = ["locale" => $locale, "url" => $url];
}
public function getAlternate(string $locale) :array {
return $this->alternate[$locale] ?? [];
}
public function getAlternates() :array {
return $this->alternate;
}
public function run(string $site) {
$site = trim($site);
if(empty($site)) $site = "index/index";
$this->site = $site;
$this->action = isset($_GET['action']) ? $_GET['action'] : false;
$this->forceclearcache = empty($_GET['clearcache']) ? false : true;
$this->defineCostants();
$this->getModule($this->site, true);
}
public function getModule(?string $site, bool $root = false) {
if($this->isMaintenance() && $root) {
$this->header503();
} elseif($this->existsSite($site)) {
$module = $this->getSitePath($site);
$appid = $this->appid;
} elseif($root) {
$this->header404();
} else {
throw new \Exception($site . " not exists");
}
if(!is_callable($this->authcallback)) {
/var/www/html/vendor/wmindsrl/common/src/Core/Pages.php
} elseif(!$withslash && !$withdot && empty($flex)) {
$url = $this->baseurl.$req."/";
$this->cms->redirect301($url);
return;
} elseif($withslash && $withdot && empty($flex)) {
$url = $this->baseurl.$req;
$this->cms->redirect301($url);
return;
}
if(isset($flex)) $this->cms->flex($flex);
if($urlmode == self::URLMODE_FIXED || ($urlmode == self::URLMODE_FLEX && empty($flex))) {
$this->cms->setMeta("canonical", $this->baseurl.(empty($req) ? null : $req."/"));
foreach($this->getAlternate($this->key) as $a) {
$this->cms->setAlternate($a['locale'], $a['url']);
}
}
//added to get cms locale
$this->site = $site;
if(empty($param['norun'])) $this->cms->run($this->site);
} elseif($statuscode == 301) {
$this->cms->redirect301($redirecturl);
return;
} elseif($statuscode == 302) {
$this->cms->redirect302($redirecturl);
return;
} elseif($statuscode == 404) {
$this->cms->header404();
return;
} elseif($statuscode == 410) {
$this->cms->header410();
return;
} else {
throw new \UnexpectedValueException("Status code not valid: ".$statuscode);
}
/var/www/html/wwwroot/index.php
define("GOOGLE_RECAPTCHAV3_PUBLIC", $cms->getEnv("GOOGLE_RECAPTCHAV3_PUBLIC"));
define("GOOGLE_RECAPTCHAV3_SECRET", $cms->getEnv("GOOGLE_RECAPTCHAV3_SECRET"));
define("URL_FACEBOOK", $cms->getEnv("URL_FACEBOOK"));
define("URL_INSTAGRAM", $cms->getEnv("URL_INSTAGRAM"));
define("URL_TWITTER", $cms->getEnv("URL_TWITTER"));
global $pages;
$pages = (new Pages($cms))
->load();
// Disable on production
//if(!$cms->isTrusted()) {
// if(empty($_GET['enablepreview']) && empty($_SESSION['enablepreview'])) {
// $pages->disableLocale("it");
// } else {
// $_SESSION['enablepreview'] = true;
// }
//}
$pages->run(["defaultlocale" => "it"]);
Environment & details:
empty
empty
empty
empty
| Key | Value |
| csrf_token | 7a834671354d23e8d2ed5a1ace7a33a205ba6696eff135f81f19e4ee345db541 |
| Key | Value |
| URL_PUBLIC | https://regenerationfestival.wmind.it/public |
| DB_ENGINE | InnoDB |
| APPID | REGENERATIONFESTIVAL |
| GOOGLE_RECAPTCHAV3_PUBLIC | 6Lc7rzsqAAAAAEWIZ-6ljrInTHSvneP82U12Ds9h |
| USERDB_HOST | 10.109.112.3 |
| HOSTNAME | d4bce6e27bd1 |
| DB_PORT | 3306 |
| SRC_STORAGE | /var/www/html/storage |
| USERDB_USER | web |
| DEBUG | true |
| PHP_INI_DIR | /usr/local/etc/php |
| SMTP_PORT | 587 |
| SRC_TRANSLATER | /var/www/html/storage/translater |
| DB_COLLATION | utf8mb4_unicode_ci |
| SRC_CACHE | /var/www/html/storage/cdata |
| DB_CHARSET | utf8mb4 |
| HOME | /var/www |
| DB_NAME | regenerationfestival |
| SRC_MODULES | /var/www/html/modules |
| SRC_LOG | /var/www/html/storage/logs |
| SRC_PRIVATE | /var/www/html/private |
| URL_CACHE | https://regenerationfestival.wmind.it/cdata |
| USERDB_PORT | 3306 |
| GOOGLE_RECAPTCHAV3_SECRET | 6Lc7rzsqAAAAADpHSg3p4lBAXqHNpHKufsCU2soy |
| PHP_LDFLAGS | -Wl,-O1 -pie |
| PHP_CFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_VERSION | 8.4.19 |
| USERDB_NAME | regenerationfestival |
| GPG_KEYS | AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6 0616E93D95AF471243E26761770426E17EBBB3DD |
| PHP_CPPFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
| PHP_ASC_URL | https://www.php.net/distributions/php-8.4.19.tar.xz.asc |
| SRC_PAGESMETA | /var/www/html/storage/pagesmeta |
| PHP_URL | https://www.php.net/distributions/php-8.4.19.tar.xz |
| DEFAULT_TIMEZONE | Europe/Rome |
| URL_ASSETS | https://regenerationfestival.wmind.it/public/assets |
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENTITYCMS_APP | regenerationfestival |
| DB_PREFIX | wmindweb_ |
| DEFAULT_LOCALE | it_IT |
| DB_PASS | bFVnBcaR*^1kR]d6 |
| SMTP_PASS | 6cdc0e94-7608-4dd9-af19-eb7a96f97450 |
| PHPIZE_DEPS | autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c |
| PWD | /var/www/html |
| SMTP_ENCRYPT | TLS |
| SRC_PAGES | /var/www/html/private/pages |
| DB_VERSION | 5.7 |
| PHP_SHA256 | 11f7164ab26d356c31f94d3d69cc0e0707d5d2d6494a221aaeae307c08eaaa1c |
| SRC_ENTITYDATA | /var/www/html/storage/entitydata/ |
| USERDB_PASS | bFVnBcaR*^1kR]d6 |
| SRC_PUBLIC | /var/www/html/public |
| CURRENT_ENV | prod |
| DB_HOST | 10.109.112.3 |
| URL_API_LOGGERHIT | |
| ENABLE_LOGGERHIT | 0 |
| SMTP_HOST | smtp.postmarkapp.com |
| DB_USER | web |
| SMTP_USER | 6cdc0e94-7608-4dd9-af19-eb7a96f97450 |
| USER | www-data |
| HTTP_X_REAL_IP | 216.73.216.122 |
| HTTP_X_FORWARDED_SERVER | ad10b1f225f8 |
| HTTP_X_FORWARDED_PROTO | https |
| HTTP_X_FORWARDED_PORT | 443 |
| HTTP_X_FORWARDED_HOST | regenerationfestival.wmind.it |
| HTTP_X_FORWARDED_FOR | 216.73.216.122 |
| HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
| HTTP_ACCEPT | */* |
| HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
| HTTP_HOST | regenerationfestival.wmind.it |
| REDIRECT_STATUS | 200 |
| SERVER_NAME | _ |
| SERVER_PORT | 80 |
| SERVER_ADDR | 172.19.0.10 |
| REMOTE_USER | |
| REMOTE_PORT | 33878 |
| REMOTE_ADDR | 172.19.0.3 |
| SERVER_SOFTWARE | nginx/1.26.3 |
| GATEWAY_INTERFACE | CGI/1.1 |
| REQUEST_SCHEME | http |
| SERVER_PROTOCOL | HTTP/1.1 |
| DOCUMENT_ROOT | /var/www/html/wwwroot |
| DOCUMENT_URI | /index.php |
| REQUEST_URI | / |
| SCRIPT_NAME | /index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | |
| SCRIPT_FILENAME | /var/www/html/wwwroot/index.php |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1773997497.3194 |
| REQUEST_TIME | 1773997497 |
| Key | Value |
| CURRENT_ENV | prod |
| APPID | REGNERATIONFESTIVAL |
| DEBUG | 1 |
| DEFAULT_TIMEZONE | Europe/Rome |
| DEFAULT_LOCALE | it_IT |
| SRC_LOG | /var/www/html/storage/logs |
| SRC_MODULES | /var/www/html/modules |
| SRC_PRIVATE | /var/www/html/private |
| SRC_STORAGE | /var/www/html/storage |
| SRC_PUBLIC | /var/www/html/public |
| URL_PUBLIC | https://regenerationfestival.wmind.it/public |
| URL_ASSETS | https://regenerationfestival.wmind.it/public/assets |
| SRC_CACHE | /var/www/html/storage/cdata |
| URL_CACHE | https://regenerationfestival.wmind.it/cdata |
| SRC_PAGES | /var/www/html/private/pages |
| SRC_PAGESMETA | /var/www/html/storage/pagesmeta |
| SRC_TRANSLATER | /var/www/html/storage/translater |
| ENTITYCMS_APP | regenerationfestival |
| SRC_ENTITYDATA | /var/www/html/storage/entitydata/ |
| GOOGLE_RECAPTCHAV3_PUBLIC | 6Lc7rzsqAAAAAEWIZ-6ljrInTHSvneP82U12Ds9h |
| GOOGLE_RECAPTCHAV3_SECRET | 6Lc7rzsqAAAAADpHSg3p4lBAXqHNpHKufsCU2soy |
| SMTP_HOST | smtp.postmarkapp.com |
| SMTP_USER | 6cdc0e94-7608-4dd9-af19-eb7a96f97450 |
| SMTP_PASS | 6cdc0e94-7608-4dd9-af19-eb7a96f97450 |
| SMTP_PORT | 587 |
| SMTP_ENCRYPT | TLS |
| ENABLE_LOGGERHIT | 0 |
| URL_API_LOGGERHIT | |
| DB_HOST | 10.109.112.3 |
| DB_NAME | regenerationfestival |
| DB_USER | web |
| DB_PASS | bFVnBcaR*^1kR]d6 |
| DB_PORT | 3306 |
| DB_CHARSET | utf8mb4 |
| DB_COLLATION | utf8mb4_unicode_ci |
| DB_PREFIX | wmindweb_ |
| DB_ENGINE | InnoDB |
| DB_VERSION | 5.7 |
| USERDB_HOST | 10.109.112.3 |
| USERDB_NAME | regenerationfestival |
| USERDB_USER | web |
| USERDB_PASS | bFVnBcaR*^1kR]d6 |
| USERDB_PORT | 3306 |
0. Whoops\Handler\PrettyPageHandler