Error HY000 executing statement: Array ( [0] => XYZ [1] => XYZ [2] => MySQL server has gone away )
[[!RefreshCache? &id_exceptions=`11,422,1555`]]
<!-- Menu-Resources or not Part I (Html) --> <p> <input type="checkbox" name="menuyes" value="1" checked="checked" >Include menu-resources<br> <input type="checkbox" name="menuno" value="0" >Include non-menu-resources <br> </p> <!-- END Menu-Resources or not Part I -->
// Menu-Resources or not Part II (PHP) $id_exceptions = explode(',',$scriptProperties['id_exceptions']); if($_POST['menuno'] == 1 and $_POST['menuyes'] == 1){ $hidemenu = 'hidemenu:!='; $menuvalue = 2; } if($_POST['menuno'] == 0 and $_POST['menuyes'] == 1){ $hidemenu = 'hidemenu'; $menuvalue = 0; } if($_POST['menuno'] == 1 and $_POST['menuyes'] == 0){ $hidemenu = 'hidemenu'; $menuvalue = 1; } // END Menu-Resources or not Part II
$c = array( 'published' => '1', 'deleted' => '0', 'cacheable' => '1', $hidemenu => $menuvalue, 'class_key' => 'modDocument', 'id:NOT IN' => $id_exceptions, );
<base href="[[!++site_url]]">
$url = $modx->makeUrl($pageId, '', '', 'full');
RewriteCond %{HTTP_HOST} . RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} !^www\.domain\.nl [NC] RewriteRule (.*) https://www.domain.nl/$1 [R=301,L] RewriteCond %{HTTP_HOST} . RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !^www\.domain\.nl [NC] RewriteRule (.*) http://www.domain.nl/$1 [R=301,L]
/* * Title: RevoSSL * Author: Joshua Gulledge * Created: 5/5/2011 * Updated: 4/11/2013 * Version: 1.0.1pl * Description: Allow users to make a page SSL and the Manager SSL * * Based on Evo plugin: * Title: SSL * Author: Mark Croxton, [email protected] * Desc: Plugin triggered OnWebPageInit Manages switching between https:// and http:// pages Sets site-wide custom placeholders for secure/insecure server paths and base href */ $makeSSL = false; switch($modx->event->name) { /* on the manager load */ case 'OnBeforeManagerPageInit': case 'OnManagerPageInit': case 'OnManagerLoginFormPrerender': //case 'OnManagerLoginFormRender': /** * Other events: * OnManagerPageInit * OnManagerPageInit * OnManagerLoginFormPrerender * OnManagerLoginFormRender * OnBeforeManagerLogin * OnManagerAuthentication * OnManagerLogin */ // get a system setting - revoSSL.manager $makeSSL = $modx->getOption('revoSSL.manager',$scriptProperties,false); if ( $makeSSL == 'Yes' || $makeSSL == 'Y' ) { $makeSSL = true; } break; /* On web page loads */ case 'OnWebPagePrerender': // if a property set is defined: $makeSSL = $modx->getOption('makeSSL', $scriptProperties, 0); if ( $makeSSL == '1' || $makeSSL == 1 ) { $makeSSL = true; } $id = $modx->resourceIdentifier; if ( $id > 0 ){ $resource = $modx->getObject('modResource', array('id' => $id ) ); // now if a TV is defined: if (is_object($resource) ){ // http://forums.modx.com/thread/83816/revossl---pretty-severe-bug if ($resource->get('published') == false || $resource->get('deleted')) { if ( !$modx->hasPermission('view_unpublished') ) { return false; } } // END $tmpSSL = $resource->getTVValue('makeSSL'); if ( empty($tmpSSL)){ } elseif ( $tmpSSL == '1' || $tmpSSL == 1 || $tmpSSL ) { $makeSSL = true; } else if ( $tmpSSL == 'No' || $tmpSSL == 'N' || !$tmpSSL ) { $makeSSL = false; } } } break; } // is the current page in SSL? if( $_SERVER['HTTPS'] == 1 || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_PORT'] == 443) { $ssl = true; } else { $ssl = false; } $force_redirect = false; $host = $_SERVER['HTTP_HOST']; // force www or no www $force_www = $modx->getOption('revoSSL.forceWWW', $scriptProperties, false); if ( strpos($_SERVER['HTTP_HOST'], 'www.') === false && $force_www ) { // no WWW $host = 'www.'.$_SERVER['HTTP_HOST']; $force_redirect = true; } // the current URL of the page $url = $host.$_SERVER['REQUEST_URI'];//$_SERVER['PHP_SELF']; // http://rtfm.modx.com/display/revolution20/modX.sendRedirect // switch between http / https if necessary if ( $makeSSL && !$ssl ) { // if SSL off and we are about to access a secure page then redirect $modx->sendRedirect('https://'.$url); } elseif (!$makeSSL && $ssl ) { // if SSL is on and we are about to acccess an unsecure page then redirect $modx->sendRedirect('http://'.$url); } elseif ( $force_redirect ) { // if SSL is on and we are about to acccess an unsecure page then redirect if ( $makeSSL ) { $modx->sendRedirect('https://'.$url); } else { $modx->sendRedirect('http://'.$url); } } return;
The base href is called uncached, but we changed it to //domain.nl (without the 'http' part).