Thread tagged as: Problem, Configuration

Regions are auto-procreating (multilang site)

I just get back to an old Perch client site and in my surprise there where hundreds of new regions. Any idea how to avoid them? and how to delete those unused? — thanks

some regions examples

nav-estudio-fr' aND BeNChMaRK(2999999,Md5(NoW())) AnD '1
nav-estudio-fr' or (1,2)=(select*from(select name_const(CHAR(111,108,111,108,111,115,104,101,114),1),name_const(CHAR(111,108,111,108,111,115,104,101,114),1))a) -- 'x'='x


multilang config


    if (isset($_GET['lang']) && $_GET['lang']!='') {
      $lang = $_GET['lang'];
      $_SESSION['lang'] = $lang;
    }elseif (isset($_SESSION['lang'])){
      $lang = $_SESSION['lang'];
      // default language
      $lang = 'es';

    if (isset($_GET['cat']) && $_GET['cat']!='') {
      $cat = $_GET['cat'];
      $_SESSION['cat'] = $cat;
    }elseif (isset($_SESSION['cat'])){
      $cat = $_SESSION['cat'];
      // default cat
      $cat = 'transporte';

    PerchSystem::set_var('lang', $lang); // para blog multilang 
    PerchSystem::set_var('cat', $cat);
    PerchSystem::set_var('current_slug', perch_get('s')); // para hacer el currentproject del post

here is my diagnostic

Perch: 3.0.14 Production mode: Production (100) Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_blog (5.5.1) DB driver: PDO DB tables: perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (0), perch2_menu_items (8), perch2_navigation (0), perch2_navigation_pages (0), perch2_resource_log (0), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_user_passwords (0), perch2_user_role_privileges (0), perch3_blog_authors (2), perch3_blog_comments (0), perch3_blog_index (2420), perch3_blog_posts (34), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blogs (1), perch3_categories (6), perch3_category_counts (4), perch3_category_sets (1), perch3_content_index (2950), perch3_content_items (203), perch3_content_regions (179), perch3_menu_items (9), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (9), perch3_resource_log (2008), perch3_resource_tags (3), perch3_resources (1024), perch3_resources_to_tags (18), perch3_settings (27), perch3_user_passwords (1), perch3_user_privileges (36), perch3_user_role_privileges (10), perch3_user_roles (2), perch3_users (2) Users: 2 App runtimes: <?php $apps_list = [ 'perch_blog', 'categories', 'content', ]; Scheduled tasks for perch_blog: delete_spam_comments (1440 mins) Editor plug-ins: H1: c84ca6e111159206712fc5e8eb83eabe L1: d18cc9909abb7171bdcb33e0b4a215a6 F1: 3b606135b33e6a102526838f4152a807 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 0 content_collapseList: 1 lang: en-gb installedAt: 3.0.2 update_3.0.2: done latest_version: on_sale_version: 3.0.14 perch_blog_update: 5.0.1 perch_blog_post_url: /proyecto.php?s={postSlug} headerScheme: light perch_blog_site_name: perch_blog_slug_format: {postTitle} perch_blog_akismet_key: perch_blog_max_spam_days: 0 dashboard: 0 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 perch_blog_comment_notify: 0 update_3.0.4: done update_3.0.5: done update_3.0.8: done update_3.0.14: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: qxz833 PERCH_DB_SERVER: PERCH_DB_DATABASE: qxz832 PERCH_DB_PREFIX: perch3_ PERCH_TZ: UTC PERCH_EMAIL_FROM: PERCH_EMAIL_FROM_NAME: Raul Serrano PERCH_LOGINPATH: /perch PERCH_PATH: /var/www/vhost/ PERCH_CORE: /var/www/vhost/ PERCH_RESFILEPATH: /var/www/vhost/ PERCH_RESPATH: /perch/resources PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_RUNWAY_ROUTED: PERCH_STRONG_PASSWORDS: PERCH_ASSET_VERSION: f704e7442d11292c99b5 PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /var/www/vhost/ PERCH_TEMPLATE_FILTERS: PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_XHTML_MARKUP: PERCH_RWD: 1 PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_PARANOID: PERCH_FORCE_SECURE_COOKIES: PERCH_DEFAULT_BUCKET: default PERCH_TRANSLATION_ASSIST: PERCH_PASSWORD_MIN_LENGTH: 6 PERCH_MAX_FAILED_LOGINS: 10 PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR PERCH_VERIFY_UPLOADS: PERCH_PRIV_ASSIST: PERCH_CUSTOM_EDITOR_CONFIGS: PERCH_ENABLE_EXIF: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown Hosting settings PHP: 5.4.40 Zend: 2.4.0 OS: Linux SAPI: fpm-fcgi Safe mode: not detected MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ MySQL server: 5.6.38 Free disk space: 271.25 GB Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, bcmath, curl, dba, dom, fileinfo, gd, imagick, imap, intl, json, exif, mcrypt, mssql, mysqlnd, mysql, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, soap, sqlite3, sysvmsg, sysvsem, sysvshm, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, Zend Guard Loader, Zend OPcache GD: Yes ImageMagick: Yes PHP max upload size: 64M PHP max form post size: 64M PHP memory limit: 128M Total max uploadable file size: 64M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /sbin:/usr/sbin:/bin:/usr/bin USER: HOME: /var/www/vhost/ FCGI_ROLE: RESPONDER REDIRECT_UNIQUE_ID: Wpk20tlMhOcAAEgwOA0AAAAA REDIRECT_HANDLER: application/x-httpd-fastphp REDIRECT_STATUS: 200 UNIQUE_ID: Wpk20tlMhOcAAEgwOA0AAAAA HTTP_HOST: HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:58.0) Gecko/20100101 Firefox/58.0 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5 HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_REFERER: HTTP_COOKIE: PHPSESSID=6uukrvg7tvd5bbo551hhq7d4l1; cmsa=1 HTTP_CONNECTION: keep-alive HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_DNT: 1 SERVER_SOFTWARE: Apache SERVER_NAME: SERVER_ADDR: SERVER_PORT: 80 REMOTE_ADDR: DOCUMENT_ROOT: /var/www/vhost/ SERVER_ADMIN: SCRIPT_FILENAME: /var/www/vhost/ REMOTE_PORT: 53215 REDIRECT_QUERY_STRING: extended REDIRECT_URL: /perch/core/settings/diagnostics/index.php GATEWAY_INTERFACE: CGI/1.1 SERVER_PROTOCOL: HTTP/1.1 REQUEST_METHOD: GET QUERY_STRING: extended REQUEST_URI: /perch/core/settings/diagnostics/?extended SCRIPT_NAME: /perch/core/settings/diagnostics/index.php ORIG_SCRIPT_FILENAME: /var/www/vhost/ ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php ORIG_PATH_TRANSLATED: /var/www/vhost/ ORIG_SCRIPT_NAME: /fcgi-bin/php.fcgi PHP_SELF: /perch/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1519990482.3931 REQUEST_TIME: 1519990482
Raul Serrano

Raul Serrano 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You're accepting whatever value of lang is on the URL.

Try the example in the documentation - it should avoid that:

Thanks Drew