Forum

Thread tagged as: Question, Problem, Error

new page from master page adding duplicate regions

my new pages from my master page always have duplicated regions. I edit it once and automatically have 2 items on the page which are the same.

Report:

PERCH INFORMATION

Perch: 2.8.31
Production mode: Development (10)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_events (1.9), perch_gallery (2.8.4), perch_members (1.0.3), perch_podcasts (1.0)
DB driver: PDO
DB tables: perch2_blog_authors (6), perch2_blog_categories (17), perch2_blog_comments (0), perch2_blog_index (41739), perch2_blog_posts (1254), perch2_blog_posts_to_categories (1221), perch2_blog_posts_to_tags (560), perch2_blog_sections (10), perch2_blog_tags (27), perch2_blogs (1), perch2_categories (17), perch2_category_counts (17), perch2_category_sets (1), perch2_content_index (622), perch2_content_items (80), perch2_content_regions (6), perch2_events (110), perch2_events_categories (3), perch2_events_to_categories (90), perch2_gallery_albums (1), perch2_gallery_image_versions (18), perch2_gallery_images (3), perch2_members (1), perch2_members_forms (1), perch2_members_member_tags (0), perch2_members_sessions (1), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (2), perch2_pages (19), perch2_podcasts (2), perch2_podcasts_downloads (0), perch2_podcasts_episodes (3), perch2_resource_log (8317), perch2_resource_tags (4), perch2_resources (5764), perch2_resources_to_tags (4), perch2_settings (45), perch2_user_passwords (0), perch2_user_privileges (48), perch2_user_role_privileges (38), perch2_user_roles (4), perch2_users (7)
Users: 7
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_members',
        'perch_blog',
        'perch_podcasts',
        'perch_events',
        'perch_gallery',
    );
?>
Scheduled tasks for perch_events: update_category_counts (60 mins)
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: ckeditor, tinymce, markitup
H1: 225eb4eaa1fbb5e389a5273af31edc29
L1: b91f96b0eb1406eb2ae5d148f801b675
F1: 0243314cd872a1b8ddf8ff917af81c7e
headerColour: #1d7eb5
content_singlePageEdit: 1
helpURL:
hideBranding: 1
content_collapseList: 1
lang: de_de
update_2.3.2: done
latest_version: 2.8.15
headerScheme: dark
siteURL: https://test.sthoerfunk.de
dashboard: 0
content_hideNonEditableRegions: 0
logoPath: /perch/resources/sflogoblauorange.png
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
on_sale_version: 2.8.31
update_2.4.5: done
content_frontend_edit: 0
perch_gallery_update: 2.8.4
perch_events_update: 1.8
perch_members_login_page: /members/login.php?r={returnURL}
perch_events_detail_url: /events/event.php?event={eventSlug}
perch_gallery_bucket_mode: dynamic
perch_gallery_bucket: gallery_images
perch_gallery_basicUpload: 0
update_2.4.8: done
hide_pwd_reset: 0
update_2.4.9: done
update_2.5: done
update_2.5.1: done
update_2.5.4: done
update_2.6.3: done
update_2.6.5: done
update_2.8.31: done
perch_blog_update: 5.0.1
perch_blog_site_name:
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: perch_test
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: perch_test
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/Berlin
PERCH_EMAIL_FROM: iphone@sdb-grafik.de
PERCH_EMAIL_FROM_NAME: Matthew Owen
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/homepage.d/test/perch
PERCH_CORE: /var/www/homepage.d/test/perch/core
PERCH_RESFILEPATH: /var/www/homepage.d/test/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG: 1
PERCH_PRODUCTION_MODE: 10
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_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/homepage.d/test/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.6.23-0+deb8u1
Zend: 2.6.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.49
MySQL server: 5.5.49-0+deb8u1
Free disk space: 444,34 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, gd, intl, json, mcrypt, mysql, mysqli, pdo_mysql, pspell, readline, mhash, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 256M
PHP max form post size: 256M
PHP memory limit: 1024M
Total max uploadable file size: 256M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
HTTP_HOST: test.sthoerfunk.de
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: PHPSESSID=sa2c78u6ioqbhke8ci7punrhd1; _pk_id.1.9f71=057c1ee4211a0967.1473083455.20.1473864164.1473864158.; cmsa=1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/601.7.8
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_REFERER: https://test.sthoerfunk.de/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE: <address>Apache/2.4.10 (Debian) Server at test.sthoerfunk.de Port 80</address>
SERVER_SOFTWARE: Apache/2.4.10 (Debian)
SERVER_NAME: test.sthoerfunk.de
SERVER_ADDR: 81.169.230.111
SERVER_PORT: 80
REMOTE_ADDR: 178.2.87.13
DOCUMENT_ROOT: /var/www/test
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /var/www/test
SERVER_ADMIN: webmaster@sthoerfunk.de
SCRIPT_FILENAME: /var/www/test/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 61019
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
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1474376316,174
REQUEST_TIME: 1474376316

Master Page Template

<?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php'); ?>
<!doctype html>

<!--[if lt IE 7 ]> <html class="ie ie6 ie-lt10 ie-lt9 ie-lt8 ie-lt7 no-js" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie ie7 ie-lt10 ie-lt9 ie-lt8 no-js" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie ie8 ie-lt10 ie-lt9 no-js" lang="en"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie ie9 ie-lt10 no-js" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]-->

<head>

    <meta charset="utf-8">
    <!-- Always force latest IE rendering engine (even in intranet) -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- Important stuff for SEO, don't neglect. (And don't dupicate values across your site!) -->
    <title><?php perch_pages_title(); ?></title>
    <meta name="author" content="" />
    <meta name="description" content="" />

    <!-- Don't forget to set your site up: https://google.com/webmasters -->
    <meta name="google-site-verification" content="" />

    <!-- Who owns the content of this site? -->
    <meta name="Copyright" content="" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">

    <!-- Use Iconifyer to generate all the favicons and touch icons you need: https://iconifier.net -->
    <link rel="shortcut icon" href="favicon.ico" />
    <!-- Add the Fonts from Google -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Merriweather:400,300,700,900,300italic,400italic,700italic,900italic" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Stardos+Stencil" />

    <!-- Grab the CSS which is minified from CodeKit2 -->
    <?php perch_get_css(); ?>

    <script src="../assets/js/modernizr.js"></script> <!-- Modernizr -->

</head>

<body class="#">
    <?php perch_layout('globalnew.navigation'); ?>
    <?php perch_layout('globalnew.header'); ?>  
    <?php perch_layout('globalnew.freq-block'); ?>



    <!-- adding an horizontal On-Air now plane -->
    <div class="horizontal-onair-container"><!--Visibility-->
        <section class="#">
            <!-- Bild -->
            <div class="horizontal-show-bild">
              <img id="sendung_bild" src="https://daten2.sthoerfunk.de/bilder/_platzhalter_.png">
            </div>
            <!-- Titel -->
            <div class="horizontal-show-info">
                <span class="white">Jetzt läuft: </span><br />
                <span id="sendung_titel" class="yellow"></span><br />
                <span id="sendung_kurzinfo" class="white"></span>
            </div>
             <!-- Stream Button -->
            <div class="horizontal-livestream">
                <a href="/sf-player.php" onclick="return popitup('/sf-player.php')">
                    <img src="<?php perch_path('feathers/startblock/img/stream-button.svg'); ?>" alt="Livestream Pop-Up Fenster">
                </a>
            </div>
        </section>
    </div>


    <!-- Main Content einfügen -->
    <div class="main-content-container"><!-- Start Full Width Wrapper -->
        <section class="#"><!-- Start Wrapper in -->

            <div class="article-container"><!-- Split to 12 from 16 -->
                <!-- Add the Inhalt -->
                <?php perch_content('Inhalt'); ?>
            </div><!--Close the Article Div-->

            <?php perch_layout('globalnew.sendungsinfo'); ?>                

        </section><!-- Wrapper in ends -->
    </div> <!-- End of Full Width Wrapper -->

    <?php perch_layout('globalnew.footer'); ?>  

<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src='assets/js/libs/jquery-1.11.3.min.js'>\x3C/script>")</script>

<!-- this is where we put our custom functions -->
<!-- don't forget to concatenate and minify for production -->
<script src="assets/js/functions.js"></script>
<script>$(document).ready(initPage);</script>

<!-- Asynchronous google analytics; this is the official snippet.
     Replace UA-XXXXXX-XX with your site's ID and uncomment to enable.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-XXXXXX-XX', 'auto');
  ga('send', 'pageview');

</script>
-->

<!-- Sf Radioautomationen Scripts einfügen -->
<script src="/perch/addons/feathers/radioautomation/js/sendungsinfo.js" type="text/javascript"></script>
<script src="/perch/addons/feathers/radioautomation/js/redaktionenliste.js" type="text/javascript"></script>
<script src="/perch/addons/feathers/radioautomation/js/sendungsinfo.js" type="text/javascript"></script>
<script src="/perch/addons/feathers/startblock/js/popup.js" type="text/javascript"></script>
<script src="assets/js/jquery.slicknav.min.js"></script>

<script src="../assets/js/min/main-min.js"></script> <!-- Resource jQuery -->

<!-- End of Responsive Menu -->

<script>
    new UISearch( document.getElementById( 'sb-search' ) );
</script>


<!-- Calling the Owl Carousel-->
    <script type="text/javascript">
        $('.owl-carousel').owlCarousel({
                loop:true,
                autoplay:true,
                margin:16,
                dots:false,
                responsiveClass:true,
                responsive:{
                    0:{
                        items:1,
                        nav:false
                    },
                    768:{
                        items:2,
                        nav:false
                    },
                    1024:{
                        items:4,
                        nav:false,
                        loop:false
                    }
                }
            })

            $('.owl-carousel-media').owlCarousel({
                loop:true,
                autoplay:true,
                responsiveClass:true,
                responsive:{
                    0:{
                        items:2,
                        nav:false,
                        loop:true
                    },
                    768:{
                        items:4,
                        nav:false,
                        loop:true
                    },
                    1024:{
                        items:4,
                        nav:false,
                        loop:true
                    }
                }
            })
    </script>

    <!-- Activate the Tooltip -->
    <script>
        $(document).ready(function() {
            $('.tooltip').tooltipster();
                theme: ['tooltipster-noir', 'tooltipster-noir-customized']
        });
    </script>

    <!-- refills expander -->

    <!-- End Slick Nav -->

</body>
</html>


Matthew Owen

Matthew Owen 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I only see one region - Inhalt - is that the region you mean?

correct Drew, that is the region, when I add content to the region and save, it creates a duplicate version giving me 2 items, which I can only delete as a pair. Here is the Template I am using for the region:

<div class="post-wrapper"><!-- creates the space, good for responsivness -->

    <!-- Add the Titles-->
    <div class="obertitel-article bg-<perch:content id="themen" format="LC" urlify="true"/>"><perch:content id="themenTitle" type="text" label="Obertitel" required="true" size="xl autowidth" order="1" /></div>
    <div class="article-title-post"><perch:content id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="2" /></div>

    <!--Add the image & Bildunterschrift-->
    <perch:if exists="image">
        <figure>
            <img src="<perch:content id="image" type="image" width="700" height="350" crop="true" label="Image, Nicht vergessen!" order="5" />" alt="<perch:content id="postTitle" />" />
        <perch:if exists="Bildunterschrift">    
            <figcaption>  
                <perch:content id="Bildunterschrift" type="textarea" label="Bildunterschrift" editor="tinymce" html="true" size="l autowidth" order="6" />
            </figcaption>
        </perch:if>   
        </figure>
    </perch:if>

    <!-- Add the Inhalt-->
    <div class="post-inhalt">
        <perch:content id="inhalt" type="textarea" label="Post" order="3" editor="ckeditor" html="true" size="xxl autowidth" required="true" />
    </div>  

    <!-- Add the Audio Files-->
    <perch:if exists="audio_file">
        <div class="audio-holder">
            <div class="listen-post">Anhören:</div>
            <audio src="<perch:content id="audio_file" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank"></audio>
            <perch:content id="mp3_download" type="checkbox" label="MP3 als Download möglich" value="download" default="download" suppress="true"/>
            <perch:if exists="mp3_download" value="Download">
                <div class="download-post"><a href="<perch:content id="audio_file" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank">mp3 herunterladen</a> 
                (<perch:content id="audio_file" type="file" label="MP3" bucket="mp3_upload" output="size" format="MB"/>)</div>
            </perch:if> 
        </div>
    </perch:if> 

    <perch:if exists="audio_file_zwei">
        <div class="audio-holder">
            <div class="listen-post">Anhören:</div>
            <audio src="<perch:content id="audio_file_zwei" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank"></audio>
            <perch:content id="mp3_download" type="checkbox" label="MP3 als Download möglich" value="download" default="download" suppress="true"/>
            <perch:if exists="mp3_download" value="Download">
                <div class="download-post"><a href="<perch:content id="audio_file_zwei" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank">mp3 herunterladen</a> 
                (<perch:content id="audio_file_zwei" type="file" label="MP3" bucket="mp3_upload" output="size" format="MB"/>)</div>
            </perch:if> 
        </div>
    </perch:if> 

    <perch:if exists="audio_file_drei">
        <div class="audio-holder">
            <div class="listen-post">Anhören:</div>
            <audio src="<perch:content id="audio_file_drei" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank"></audio>
            <perch:content id="mp3_download" type="checkbox" label="MP3 als Download möglich" value="download" default="download" suppress="true"/>
            <perch:if exists="mp3_download" value="Download">
                <div class="download-post"><a href="<perch:content id="audio_file_drei" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank">mp3 herunterladen</a> 
                (<perch:content id="audio_file_drei" type="file" label="MP3" bucket="mp3_upload" output="size" format="MB"/>)</div>
            </perch:if> 
        </div>
    </perch:if> 

    <perch:if exists="audio_file_vier">
        <div class="audio-holder">
            <div class="listen-post">Anhören:</div>
            <audio src="<perch:content id="audio_file_vier" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank"></audio>
            <perch:content id="mp3_download" type="checkbox" label="MP3 als Download möglich" value="download" default="download" suppress="true"/>
            <perch:if exists="mp3_download" value="Download">
                <div class="download-post"><a href="<perch:content id="audio_file_vier" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank">mp3 herunterladen</a> 
                (<perch:content id="audio_file_vier" type="file" label="MP3" bucket="mp3_upload" output="size" format="MB"/>)</div>
            </perch:if> 
        </div>
    </perch:if> 

    <perch:if exists="audio_file_funf">
        <div class="audio-holder">
            <div class="listen-post">Anhören:</div>
            <audio src="<perch:content id="audio_file_funf" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank"></audio>
            <perch:content id="mp3_download" type="checkbox" label="MP3 als Download möglich" value="download" default="download" suppress="true"/>
            <perch:if exists="mp3_download" value="Download">
                <div class="download-post"><a href="<perch:content id="audio_file_funf" type="file" label="MP3" bucket="mp3_upload"/>" class="piwik_download" target="_blank">mp3 herunterladen</a> 
                (<perch:content id="audio_file_funf" type="file" label="MP3" bucket="mp3_upload" output="size" format="MB"/>)</div>
            </perch:if> 
        </div>
    </perch:if> 

    <!-- Add a file if needed-->
    <perch:if exists="file-download">
        <div class="row">
            <div class="large-8 large-offset-3 columns white end marginbottom">
                <a href="<perch:content id="file-download" type="file" label="Dateien einfügen" bucket="Dateien"/>" target="_blank"><button class="download">Datei herunterladen</button></a>
            </div>
        </div>              
    </perch:if> 

    <hr />

    <!-- Used to generate the Themes-->
    <perch:content id="themen" type="select" label="Thema" help="Wähle das passende Thema zur Meldung, damit es nach Themen gefiltert werden kann" options="Sport, Politik, Kultur, Wirtschaft, Gesellschaft, Hörspiele & Feature, Meinung, Radio, Bildung & Wissen, Allerlei, Umwelt" allowempty="false" required="true" order="7" suppress="true"/>

    <!-- Adding extra Image sizes-->
    <perch:content id="image" type="image" width="265" height="180" crop="true" label="Image" order="5" suppress="true"/>
    <perch:content id="image" type="image" width="940" height="720" crop="true" label="Image" order="5" suppress="true"/>
    <perch:content id="image" type="image" width="320" height="240" crop="true" label="Image" order="5" suppress="true"/>

</div><!-- End of Post Wrapper -->

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you delete the region and then refresh the page, do both come back?

I deleted the region (items) in the back end and refreshed the page the region comes back with no items. As a test when making the region settings I chose 'allow multiple items' and that appears to have solved the issue.

I then deleted that item and refreshed, set region to not allow multiple items and after save two duplicate items again.

here is the debug from the backend:


Time Δ Debug Message 0,0282 0 [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='a021774aba2226283342d6315ee73b23' LIMIT 1 0,0287 0,0005 UPDATE perch2_users SET userHash='55ac3019dbf76d931356be6c8e80ab2f' WHERE userID='1' 0,0289 0,0002 [48] SELECT p.privKey FROM perch2_user_privileges p 0,0293 0,0004 [41] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID 0,0321 0,0028 [1] SELECT * FROM perch2_content_regions WHERE regionID=19 LIMIT 1 0,0323 0,0003 [1] SELECT * FROM perch2_pages WHERE pageID='22' LIMIT 1 0,0324 0,0001 [1] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=0 ORDER BY itemOrder ASC 0,0326 0,0001 [1] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=0 ORDER BY itemOrder ASC 0,033 0,0004 Using template: /templates/content/standard-beitrag.html 0,0357 0,0027 INSERT INTO perch2_content_items (itemID, regionID, pageID, itemRev, itemOrder, itemJSON, itemSearch, itemUpdatedBy) SELECT itemID, regionID, pageID, 1 AS itemRev, itemOrder, itemJSON, itemSearch, '1' AS itemUpdatedBy FROM perch2_content_items WHERE regionID=19 AND itemRev=0 ORDER BY itemOrder ASC 0,0362 0,0005 REPLACE INTO perch2_resource_log (appID, itemFK, itemRowID, resourceID) SELECT cr.appID, cr.itemFK, c2.itemRowID, cr.resourceID FROM perch2_resource_log cr, perch2_content_items c1, perch2_content_items c2 WHERE cr.appID='content' AND cr.itemFK='itemRowID' AND cr.itemRowID=c1.itemRowID AND c1.itemID = c2.itemID AND c1.regionID=19 AND c2.regionID=19 AND c1.itemRev = 0 AND c2.itemRev = 1 0,0684 0,0322 [2] SELECT itemRowID FROM perch2_content_items WHERE regionID=19 AND itemRev=1 ORDER BY itemOrder ASC 0,0688 0,0004 UPDATE perch2_content_items SET itemOrder=1000 WHERE itemRowID='112' 0,069 0,0002 UPDATE perch2_content_items SET itemOrder=1001 WHERE itemRowID='241' 0,0692 0,0002 UPDATE perch2_content_regions SET regionLatestRev=1, regionRev=1 WHERE regionID='19' 0,0694 0,0002 [1] SELECT regionRev FROM perch2_content_regions WHERE regionID=19 0,0696 0,0002 DELETE FROM perch2_content_items WHERE regionID=19 AND itemRev!=1 AND itemRev IN (SELECT itemRev FROM (SELECT DISTINCT itemRev FROM perch2_content_items WHERE regionID=19 ORDER BY itemRev DESC LIMIT 8, 99999) AS t2) 0,0698 0,0003 DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID NOT IN (SELECT itemRowID FROM perch2_content_items) 0,0704 0,0005 [2] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=1 ORDER BY itemOrder ASC 0,0707 0,0003 DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID='112' 0,1172 0,0465 [1] SELECT * FROM perch2_resources WHERE resourceID='6368' LIMIT 1 0,1175 0,0004 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceKey='thumb' 0,1177 0,0002 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=700 AND resourceTargetHeight=350 AND resourceCrop=1 AND resourceDensity=1 0,1179 0,0002 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=265 AND resourceTargetHeight=180 AND resourceCrop=1 AND resourceDensity=1 0,118 0,0002 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=320 AND resourceTargetHeight=240 AND resourceCrop=1 AND resourceDensity=1 0,1182 0,0001 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=940 AND resourceTargetHeight=720 AND resourceCrop=1 AND resourceDensity=1 0,1193 0,0012 INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',112,6368),('content','itemRowID',112,6369),('content','itemRowID',112,6370),('content','itemRowID',112,6371),('content','itemRowID',112,6372),('content','itemRowID',112,6373) 0,1197 0,0004 UPDATE perch2_content_items SET itemJSON='{\"_id\":\"16\",\"themenTitle\":\"test\",\"postTitle\":\"test\",\"inhalt\":{\"_flang\":\"html\",\"raw\":\"<p>test<\\/p>\",\"processed\":\"<p>test<\\/p>\"},\"image\":{\"assetID\":\"6368\",\"title\":\"Lissy und miro w700h350\",\"_default\":\"\\/perch\\/resources\\/lissy-und-miro-w700h350-1.jpg\",\"bucket\":\"default\",\"path\":\"lissy-und-miro-w700h350-1.jpg\",\"size\":58334,\"w\":700,\"h\":350,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"75\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"lissy-und-miro-w700h350-1-thumb@2x.jpg\",\"size\":14667,\"mime\":\"\",\"assetID\":\"6369\"},\"w700h350c1\":{\"w\":\"700\",\"h\":\"350\",\"target_w\":\"700\",\"target_h\":\"350\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w700h350.jpg\",\"size\":58334,\"mime\":\"\",\"assetID\":\"6370\"},\"w265h180c1\":{\"w\":\"265\",\"h\":\"180\",\"target_w\":\"265\",\"target_h\":\"180\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w265h180.jpg\",\"size\":17142,\"mime\":\"\",\"assetID\":\"6371\"},\"w320h240c1\":{\"w\":\"320\",\"h\":\"240\",\"target_w\":\"320\",\"target_h\":\"240\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w320h240.jpg\",\"size\":24362,\"mime\":\"\",\"assetID\":\"6372\"},\"w940h720c1\":{\"w\":\"700\",\"h\":\"350\",\"target_w\":\"940\",\"target_h\":\"720\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w940h720.jpg\",\"size\":58334,\"mime\":\"\",\"assetID\":\"6373\"}}},\"Bildunterschrift\":{\"_flang\":\"html\",\"raw\":\"<p>test<\\/p>\",\"processed\":\"<p>test<\\/p>\"},\"themen\":\"Sport\",\"audio_file\":null,\"mp3_download\":null,\"audio_file_zwei\":null,\"audio_file_drei\":null,\"audio_file_vier\":null,\"audio_file_funf\":null,\"file-download\":null}', itemSearch=' test test test test Sport ' WHERE itemRowID='112' 0,12 0,0003 DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID='241' 0,1203 0,0003 [1] SELECT * FROM perch2_resources WHERE resourceID='6368' LIMIT 1 0,1205 0,0001 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceKey='thumb' 0,1206 0,0002 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=700 AND resourceTargetHeight=350 AND resourceCrop=1 AND resourceDensity=1 0,1208 0,0002 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=265 AND resourceTargetHeight=180 AND resourceCrop=1 AND resourceDensity=1 0,121 0,0001 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=320 AND resourceTargetHeight=240 AND resourceCrop=1 AND resourceDensity=1 0,1211 0,0001 [1] SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='6368' AND resourceTargetWidth=940 AND resourceTargetHeight=720 AND resourceCrop=1 AND resourceDensity=1 0,1224 0,0012 INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',241,6368),('content','itemRowID',241,6369),('content','itemRowID',241,6370),('content','itemRowID',241,6371),('content','itemRowID',241,6372),('content','itemRowID',241,6373) 0,1227 0,0003 UPDATE perch2_content_items SET itemJSON='{\"_id\":\"16\",\"themenTitle\":\"test\",\"postTitle\":\"test\",\"inhalt\":{\"_flang\":\"html\",\"raw\":\"<p>test<\\/p>\",\"processed\":\"<p>test<\\/p>\"},\"image\":{\"assetID\":\"6368\",\"title\":\"Lissy und miro w700h350\",\"_default\":\"\\/perch\\/resources\\/lissy-und-miro-w700h350-1.jpg\",\"bucket\":\"default\",\"path\":\"lissy-und-miro-w700h350-1.jpg\",\"size\":58334,\"w\":700,\"h\":350,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"75\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"lissy-und-miro-w700h350-1-thumb@2x.jpg\",\"size\":14667,\"mime\":\"\",\"assetID\":\"6369\"},\"w700h350c1\":{\"w\":\"700\",\"h\":\"350\",\"target_w\":\"700\",\"target_h\":\"350\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w700h350.jpg\",\"size\":58334,\"mime\":\"\",\"assetID\":\"6370\"},\"w265h180c1\":{\"w\":\"265\",\"h\":\"180\",\"target_w\":\"265\",\"target_h\":\"180\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w265h180.jpg\",\"size\":17142,\"mime\":\"\",\"assetID\":\"6371\"},\"w320h240c1\":{\"w\":\"320\",\"h\":\"240\",\"target_w\":\"320\",\"target_h\":\"240\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w320h240.jpg\",\"size\":24362,\"mime\":\"\",\"assetID\":\"6372\"},\"w940h720c1\":{\"w\":\"700\",\"h\":\"350\",\"target_w\":\"940\",\"target_h\":\"720\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"lissy-und-miro-w700h350-1-w940h720.jpg\",\"size\":58334,\"mime\":\"\",\"assetID\":\"6373\"}}},\"Bildunterschrift\":{\"_flang\":\"html\",\"raw\":\"<p>test<\\/p>\",\"processed\":\"<p>test<\\/p>\"},\"themen\":\"Sport\",\"audio_file\":null,\"mp3_download\":null,\"audio_file_zwei\":null,\"audio_file_drei\":null,\"audio_file_vier\":null,\"audio_file_funf\":null,\"file-download\":null}', itemSearch=' test test test test Sport ' WHERE itemRowID='241' 0,123 0,0003 [2] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=1 ORDER BY itemOrder ASC 0,1235 0,0005 [2] Using template: /templates/content/standard-beitrag.html 0,1386 0,0152 UPDATE perch2_content_regions SET regionHTML='<div class=\"post-wrapper\"><!-- creates the space, good for responsivness -->\r\n\r\n <!-- Add the Titles-->\r\n <div class=\"obertitel-article bg-sport\">test</div>\r\n <div class=\"article-title-post\">test</div>\r\n\r\n <!--Add the image & Bildunterschrift-->\r\n \r\n <figure>\r\n <img src=\"/perch/resources/lissy-und-miro-w700h350-1-w700h350.jpg\" alt=\"test\" />\r\n \r\n <figcaption> \r\n <p>test</p>\r\n </figcaption>\r\n \r\n </figure>\r\n \r\n \r\n <!-- Add the Inhalt-->\r\n <div class=\"post-inhalt\">\r\n <p>test</p>\r\n </div> \r\n \r\n <!-- Add the Audio Files-->\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n <!-- Add a file if needed-->\r\n \r\n \r\n <hr />\r\n \r\n <!-- Used to generate the Themes-->\r\n \r\n \r\n <!-- Adding extra Image sizes-->\r\n \r\n \r\n \r\n\r\n</div><!-- End of Post Wrapper --><div class=\"post-wrapper\"><!-- creates the space, good for responsivness -->\r\n\r\n <!-- Add the Titles-->\r\n <div class=\"obertitel-article bg-sport\">test</div>\r\n <div class=\"article-title-post\">test</div>\r\n\r\n <!--Add the image & Bildunterschrift-->\r\n \r\n <figure>\r\n <img src=\"/perch/resources/lissy-und-miro-w700h350-1-w700h350.jpg\" alt=\"test\" />\r\n \r\n <figcaption> \r\n <p>test</p>\r\n </figcaption>\r\n \r\n </figure>\r\n \r\n \r\n <!-- Add the Inhalt-->\r\n <div class=\"post-inhalt\">\r\n <p>test</p>\r\n </div> \r\n \r\n <!-- Add the Audio Files-->\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n <!-- Add a file if needed-->\r\n \r\n \r\n <hr />\r\n \r\n <!-- Used to generate the Themes-->\r\n \r\n \r\n <!-- Adding extra Image sizes-->\r\n \r\n \r\n \r\n\r\n</div><!-- End of Post Wrapper -->', regionRev=1, regionLatestRev=1 WHERE regionID='19' 0,139 0,0004 Setting alert: Content successfully updated (success) 0,1392 0,0001 [nil] SELECT * FROM perch2_resources WHERE resourceApp='content' AND resourceInLibrary=0 AND resourceCreated<'2016-09-20 11:10:41' AND resourceID NOT IN (SELECT resourceID FROM perch2_resource_log) 0,1443 0,0051 [1] SELECT MIN(itemRev) FROM perch2_content_items WHERE regionID=19 0,1445 0,0002 DELETE FROM perch2_content_index WHERE regionID=19 AND itemRev<0 0,1446 0,0001 [2] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=1 ORDER BY itemOrder ASC 0,1448 0,0001 DELETE FROM perch2_content_index WHERE regionID=19 AND itemRev=1 0,1455 0,0007 Using template: /templates/content/standard-beitrag.html 0,1471 0,0016 INSERT INTO perch2_content_index (itemID, regionID, pageID, itemRev, indexKey, indexValue) VALUES (16,19,13,1,'themenTitle','test'),(16,19,13,1,'postTitle','test'),(16,19,13,1,'inhalt','test'),(16,19,13,1,'image','/perch/resources/lissy-und-miro-w700h350-1.jpg'),(16,19,13,1,'Bildunterschrift','test'),(16,19,13,1,'themen','Sport'),(16,19,13,1,'audio_file',''),(16,19,13,1,'mp3_download',''),(16,19,13,1,'audio_file_zwei',''),(16,19,13,1,'audio_file_drei',''),(16,19,13,1,'audio_file_vier',''),(16,19,13,1,'audio_file_funf',''),(16,19,13,1,'file-download',''),(16,19,13,1,'_id',16),(16,19,13,1,'_order','1000') 0,1482 0,0012 INSERT INTO perch2_content_index (itemID, regionID, pageID, itemRev, indexKey, indexValue) VALUES (16,19,13,1,'themenTitle','test'),(16,19,13,1,'postTitle','test'),(16,19,13,1,'inhalt','test'),(16,19,13,1,'image','/perch/resources/lissy-und-miro-w700h350-1.jpg'),(16,19,13,1,'Bildunterschrift','test'),(16,19,13,1,'themen','Sport'),(16,19,13,1,'audio_file',''),(16,19,13,1,'mp3_download',''),(16,19,13,1,'audio_file_zwei',''),(16,19,13,1,'audio_file_drei',''),(16,19,13,1,'audio_file_vier',''),(16,19,13,1,'audio_file_funf',''),(16,19,13,1,'file-download',''),(16,19,13,1,'_id',16),(16,19,13,1,'_order','1001') 0,149 0,0008 [1] OPTIMIZE TABLE perch2_content_index 0,1548 0,0058 UPDATE perch2_pages SET pageModified='2016-09-21 11:10:41' WHERE pageID='22' 0,1551 0,0003 [2] SELECT * FROM perch2_content_items WHERE regionID=19 AND itemRev=1 ORDER BY itemOrder ASC 0,1604 0,0054 Queries: 63 0,1605 0 Memory: 1,5117
Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you show us a screenshot of the duplicate items?

of course, from back end or front end. To add to the multiple items solution, when I add the item and it is duplicated automatically, I can then go to region options add a tick to allow multiple items, save, go back to the region, delete one, go back to region options remove the tick in allow multiple items and it only has one item.

So the duplicate region item is being created only when I initially add content. Could there be something wrong with my region Template. I have copied it from a blog template I was using and changed the tags with blog to content. I see that I have a postTitle id in there - could this be a cause?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it just one page, or all pages?

each new page created has duplicate items, this morning a page had 3 duplicate items.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there any chance of seeing that screenshot?

yes, can I add images direct here or can I email them..?

that screenshot

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so when you're using "duplicated regions" do you mean duplicate items?

yes I do mean that.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that's a completely different class of question. Glad we sorted that out.

Is the content of the items the same?

If you make an edit and undo the change, what happens?

me too!

The content is exactly the same.

I made an edit, undid, and it added another duplicate item.

here: https://test.sthoerfunk.de/machmit/matt-test.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this the same for all master pages? All I can think is that somehow you've ended up with some corrupt data which is just being copied over and over.

Needless to say this isn't something that other people are seeing.