Broken nav menu in Upfront and disappearing prices of products

On this page

https://sansan.fo/handil/vorur/boggelibogg-2/

you can see that some menu items are "broken" showing "#number" instead of menu item.

Also the prices for products keep disappearing in backend.

There's not many plugins active, no caching currently on site, re-assigning menu and creating a new one didn't help for the first issue.

All the credentials are in chat note. Please refer to original chat for an update to this issue.

  • Linda

    Here are some updates on this issue:

    Pages with issue
    product pages - especially when you go to read more about a product

    It seems that the broken navbar labels - in total 2 are related to pages which aren't hooked up to market press in anyway...the pages are the front page and contact page. Furthermore the broken navbar links only occur on pages where you can 'read more' about a specific product. doesn't seem to occur elsewhere
    Navbar displays fine in the upfront editor, but not on the front end.

    Have tried editing the navbar labels again - didn't work
    added a custom menu to wordpress backend - didnt work
    deleted the entire product catalogue and republished 1 product - didn't work same issue
    deativated all plugins except upfront and marketpress - didn't work
    deactivating spirit - don't know if this works or not because the navbar doesn't display at all without an upfront theme installed as it's created in upfront

    Checked the server for possible caching issues: the only thing running on there is PHP Opcode, which will automatically refresh whenever a file is changed. This I suspect is not causing any issues with upfront at least because I have another upfront theme running on the same server which is not displaying any navbar issue.

    so that's all I know so far
    kind regards
    Linda

  • Panos

    Hey there Linda ,

    Could you connect with ftp and create folder :
    wp-content/mu-plugins if it doesn't already exsit.

    In that folder create a new php file, name it as you wish (the file extension should be .php)

    Open that file and add the following:

    <?php
    add_action( 'init', function(){
        $mp_public = MP_Public::get_instance();
        remove_filter( 'single_template', array( $mp_public, 'load_single_product_template') );
    }, 999 );

    Please let us know if this helps!

    Thanks!

    Thanks!

  • Linda

    Hi there folks
    I could get to the login page with the second code, but the site still threw an error:

    add_action( 'init', function(){ if( is_admin() ){ return; } $mp_public = MP_Public::get_instance(); remove_filter( 'single_template', array( $mp_public, 'load_single_product_template') ); }, 999 );
    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-login.php on line 394

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-login.php on line 407

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 931

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 932

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 933

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 934

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 935

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 936

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 939

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 940

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 941

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 942

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 945

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 946

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 947

    Warning: Cannot modify header information - headers already sent by (output started at /srv/users/serverpilot/apps/sansanbokur/public/wp-content/mu-plugins/correctnav.php:1) in /srv/users/serverpilot/apps/sansanbokur/public/wp-includes/pluggable.php on line 948
    Bøkur og tiltøk

  • Panos

    Hi Linda ,

    In the first code I attached there was an error in admin pages which should be corrected with the second code.

    The second one is working fine in my tests and the errors you mention seem irrelevant. Could you please share ftp information so I could so I could have a closer look?

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"

    - FTP credentials
    host
    username
    password
    (and port if required)

    - PLease don't forget to include a link back to this thread for reference

    Thanks!

  • Panos

    Hey @linda!

    Glad the menu issue is fixed

    Could you please provide some info on how to replicate the price issue when updating a product? I tried replicating on my test site and on your site ( using the test1 product ) but each time the price was updated.

    You should be good to use cache, it should be used with caution though and test all features after activating to be sure it doesn't affect any features of plugins or theme.

    Thanks!

    Thanks!

  • Linda

    Hi again Panos
    The price issue is a bit tricky, because it isn't a constant. The last time it happened was yesterday. I had just put in the 4 products but realized I had forgotten to put in the right footer and header. when I changed the header and footer on the product page, that paradoxically set the price to zero on the products. Other times I have realized I have forgotten a product image, or have edited the product description...those sorts of edits have made the price go to zero too.

    regards
    Linda

  • Panos

    Hi Linda,

    You mean you were doing some changes on upfront editor and these changes affected the prices? Changes in headers, footers or other elements from upfront editor should not have any affect to products as the meta from that post type are not accessed by upfront.

    I have been doing several changes on my test site and couldn't replicate this issue. I'm afraid there is not much we can do in this case

    It would be helpful if we had a pattern we could follow so we could replicate and see what is causing this.

    Could you please correct me if I understood something wrong here?

    Thanks!

  • Linda

    Hi there Panos

    I didn't realize I had gotten a reply. COMPLETE disaster struck today at about 15.00-16.00 local time...the site lost a pricing without warning on one of the product and one that had been shared on Facebook no less...it wasn't edited or changed, but still lost the price without warning!!!!!!!!!!!!!!!!!...Please could you check that approx time in the debug history and see if this can be resolved asap???. My time is now 19.43

    regards
    Linda

  • Linda

    I contacted the chat immediately because this is an absolute nightmare. I understood from one of your other supporters the vanishing prices is something which has been going on for months, so please advise if this plugin must be taken down from the site in order to avoid this issue. The site sansan.fo is a client's site and she sells physical products, so it is a HUGE problem

    regards
    Linda

  • Panos

    Hi Linda ,

    Honestly I can not see something in the plugins code that would allow updating price without some action being made.

    I have tried updating several times a test product in your site but the price was always the correct one, I even tried the to update with bulk options several times and again no issues.

    I have added checkpoints on files:
    wp-content/plugins/marketpress/includes/admin/class-mp-products-admin.php
    wp-content/plugins/marketpress/includes/admin/class-mp-ajax.php
    and
    wp-content/plugins/marketpress/includes/wpmudev-metaboxes/class-wpmudev-field.php

    so it should print on the debug.log file when the price gets updated and from which function it was updated.

    I'm thinking perhaps some other plugin could be responsible. I have installed the same plugin you have on my installation and I'm continuing tests.

    I understood from one of your other supporters the vanishing prices is something which has been going on for months

    I'm sure this is the first time this has been reported, I have asked other staff members but up to now none has had such a report.

    Thanks!

  • Linda

    Here's a thought. Maybe a debug log should monitor upfront and not only market press. Virtually every product page has some sort of error. This one according to google console:

    It's this line apparently:
    <div class="mp_product mp_single_product mp_single_product-has-image mp_single_product-image-alignleft"><div class="mp_single_product_images"><script>
    jQuery(document).ready(function() {
    jQuery('#mp-product-gallery').lightSlider({
    gallery:true,
    item:1,
    loop:true,
    thumbItem:5,
    slideMargin:0,
    enableDrag: true,
    currentPagerPosition:'left',

    });
    });
    </script><div class="lSSlideOuter noPager"><div class="lSSlideWrapper usingCss"><ul id="mp-product-gallery" class="mp_product_gallery lightSlider lsGrab lSSlide" style="width: 466px; transform: translate3d(0px, 0px, 0px); height: 682px; padding-bottom: 0%;"><li data-thumb="https://sansan.fo/wp-content/uploads/2017/05/boggelibogg-2-620x895.jpg" data-src="https://sansan.fo/wp-content/uploads/2017/05/boggelibogg-2.jpg" class="lslide active" style="width: 466px; margin-right: 0px;"><img src="https://sansan.fo/wp-content/uploads/2017/05/boggelibogg-2-620x895.jpg"><div class="lSAction" style="display: none;"></div></div><ul class="lSPager lSGallery" style="margin-top: 5px; transition-duration: 400ms; width: 94.7px; transform: translate3d(0px, 0px, 0px);"></div><!-- end mp_product_gallery --></div><!-- end mp_single_product_images --><div class="mp_single_product_details"><span style="display:none" class="date updated">638</span> <h1 itemprop="name" class="mp_product_name entry-title">Boggelibogg 2</h1><div class="mp_product_meta"><!-- MP Product Price --><div class="mp_product_price" itemtype="http://schema.org/Offer" itemscope="" itemprop="offers"><span class="mp_product_price-normal" itemprop="price">140.00 kr<span class="inclusve_tax"> (við MVG)</span></span></div><!-- end mp_product_price --><div class="mp_product_excerpt"><p>Hoyr um, hvussu likkan fer avstað við Klinku</p>
    </div><!-- end mp_product_excerpt --></div><!-- end mp_product_meta--><div class="mp_product_callout"><form id="mp-buy-product-638-form" class="mp_form mp_form-buy-product " method="post" data-ajax-url="https://sansan.fo/wp-admin/admin-ajax.php?action=mp_update_cart" action="https://sansan.fo/handil/kurv/" novalidate="novalidate"><input type="hidden" name="product_id" value="638">
    <div class="mp_product_options_atts">
    <div class="mp_product_options_att">
    <strong class="mp_product_options_att_label">Nøgd
    <div class="mp_form_field mp_product_options_att_field">

    <input id="mp_product_options_att_quantity" class="mp_form_input mp_form_input-qty required digits" min="1" max="4" data-msg-max="Hendan vøran er avmarkað til 4." type="number" name="product_quantity" value="1" aria-required="true">
    </div><!-- end mp_product_options_att_field -->
    </div><!-- end mp_product_options_att -->
    </div><!-- end mp_product_options_atts --><button class="mp_button mp_button-addcart" type="submit" name="addcart">Legg í Kurv</button></form><!-- end mp-buy-product-form --></div><!-- end mp_product_callout--><div class="mp_social_shares"><div id="fb-root" class=" fb_reset"><div style="position: absolute; top: -10000px; height: 0px; width: 0px;"><div></div></div><div style="position: absolute; top: -10000px; height: 0px; width: 0px;"><div><iframe name="fb_xdm_frame_https" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" id="fb_xdm_frame_https" aria-hidden="true" title="Facebook Cross Domain Communication Frame" tabindex="-1" src="https://staticxx.facebook.com/connect/xd_arbiter/r/0F7S7QWJ0Ac.js?version=42#channel=f23a27445889ee&origin=https%3A%2F%2Fsansan.fo" style="border: none;"></iframe></div></div></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = '//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4';
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-like fb_iframe_widget" data-target="_blank" href="https://sansan.fo/handil/vorur/boggelibogg-2/" data-layout="button" data-action="like" data-show-faces="false" data-share="true" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=like&app_id=&container_width=466&href=https%3A%2F%2Fsansan.fo%2Fhandil%2Fvorur%2Fboggelibogg-2%2F&layout=button&locale=en_GB&sdk=joey&share=true&show_faces=false"><span style="vertical-align: bottom; width: 94px; height: 20px;"><iframe name="f255ebdde41a818" width="1000px" height="1000px" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" title="fb:like Facebook Social Plugin" src="https://web.facebook.com/v2.4/plugins/like.php?action=like&app_id=&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2F0F7S7QWJ0Ac.js%3Fversion%3D42%23cb%3Df3d8f8906bc51d8%26domain%3Dsansan.fo%26origin%3Dhttps%253A%252F%252Fsansan.fo%252Ff23a27445889ee%26relation%3Dparent.parent&container_width=466&href=https%3A%2F%2Fsansan.fo%2Fhandil%2Fvorur%2Fboggelibogg-2%2F&layout=button&locale=en_GB&sdk=joey&share=true&show_faces=false" style="border: none; visibility: visible; width: 94px; height: 20px;" class=""></iframe></span></div>
    </div><!-- end mp_social_shares --></div><!-- end mp_single_product_details--><div class="mp_single_product_extra">
    <ul class="mp_product_tab_labels">
    <li class="mp_product_tab_label current">Lýsing
    <li class="mp_product_tab_label">Líknandi vørur
    <!-- end mp_product_tab_labels -->
    <div id="mp-product-overview-638" class="mp_product_tab_content mp_product_tab_content-overview mp_product_tab_content-current">
    <div itemprop="description" class="mp_product_tab_content_text"><p>Heima í ósanum í Lítluvík er gott at vera. Hvønn dag stuttleika tey sær óført.  Tey spæla krógva og blunda og renna um kapp og alt møguligt annað. Tey elska at hugna sær.</p>
    <p>Boggelibogg og lítla systirin, Klinka, tíma væl at spæla saman við Bumbum og hinum vinunum.  Tey hava tað so óføra stuttligt, líka til ein stór og frek likka kemur og oyðileggur teimum spælið.</p>
    <p>Hoyr um, hvussu likkan fer avstað við Klinku. Hoyr um Spíska og Snurluna og eiturkoppin og øll hini. Ein ævintýraferð er byrjað…</p>

    </div><!-- end mp_product_tab_content_text -->
    </div><!-- end mp-product-overview -->
    <div id="mp-related-products-638" class=" mp-multiple-products mp_product_tab_content mp_product_tab_content-related-products">
    <div class="mp_product_tab_content_products mp_products mp_products-related mp_products-grid"><div class="mp_products_items">
    <div class="mp_product_item mp_product_item-col-2">
    <div itemscope="" itemtype="http://schema.org/Product" class="mp_product mp_product-has-image mp_thumbnail mp_excerpt first">

    <div class="mp_product_images">

    <div itemscope="" class="hmedia">
    <div style="display:none"><span class="fn">boggelibogg1</span></div><img src="https://sansan.fo/wp-content/uploads/2017/05/boggelibogg895-620x895.jpg" itemprop="image" class="mp_product_image_list photo" title="Boggelibogg 1">
    </div>
    </div><!-- end mp_product_images -->

    <div class="mp_product_details">

    <div class="mp_product_meta">
    <h3 class="mp_product_name entry-title" itemprop="name">
    Boggelibogg 1
    </h3>
    <!-- MP Product Price --><div class="mp_product_price" itemtype="http://schema.org/Offer" itemscope="" itemprop="offers"><span class="mp_product_price-normal" itemprop="price">120.00 kr<span class="inclusve_tax"> (við MVG)</span></span></div><!-- end mp_product_price -->
    <div class="mp_product_excerpt"><p>Í hesari bókini kanst tú lesa um, tá Bogg hitti gamla krossfiskin, Stóra Kalla og øll hini Les Meira »</p></div><p></p><!-- end mp_product_excerpt -->

    <div class="mp_social_shares">

    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = '//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4';
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-like fb_iframe_widget" data-target="_blank" href="https://sansan.fo/handil/vorur/boggelibogg1/" data-layout="button" data-action="like" data-show-faces="false" data-share="true" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=like&app_id=&container_width=0&href=https%3A%2F%2Fsansan.fo%2Fhandil%2Fvorur%2Fboggelibogg1%2F&layout=button&locale=en_GB&sdk=joey&share=true&show_faces=false"><span style="vertical-align: bottom; width: 94px; height: 20px;"><iframe name="f3ce39ac6e6c16" width="1000px" height="1000px" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" title="fb:like Facebook Social Plugin" src="https://web.facebook.com/v2.4/plugins/like.php?action=like&app_id=&channel=https%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2F0F7S7QWJ0Ac.js%3Fversion%3D42%23cb%3Df6c6c9bff7319c%26domain%3Dsansan.fo%26origin%3Dhttps%253A%252F%252Fsansan.fo%252Ff23a27445889ee%26relation%3Dparent.parent&container_width=0&href=https%3A%2F%2Fsansan.fo%2Fhandil%2Fvorur%2Fboggelibogg1%2F&layout=button&locale=en_GB&sdk=joey&share=true&show_faces=false" class="" style="border: none; visibility: visible; width: 94px; height: 20px;"></iframe></span></div>

    </div><!-- end mp_social_shares -->

    </div><!-- end mp_product_meta -->

    <div class="mp_product_callout">
    <form id="mp-buy-product-628-form" class="mp_form mp_form-buy-product mp_no_single " method="post" data-ajax-url="https://sansan.fo/wp-admin/admin-ajax.php?action=mp_update_cart" action="https://sansan.fo/handil/kurv/" novalidate="novalidate"><input type="hidden" name="product_id" value="628"><button class="mp_button mp_button-addcart" type="submit" name="addcart">Legg í Kurv</button></form><!-- end mp-buy-product-form -->

    </div><!-- end mp_product_callout -->

    </div><!-- end mp_product_details -->

    <div style="display:none">
    <span class="entry-title">Boggelibogg 1</span> was last modified:
    <time class="updated">2017-05-24T19:31</time> by
    <span class="author vcard"><span class="fn">linda</span></span>
    </div>

    </div><!-- end mp_product -->
    </div><!-- end mp_product_item --></div><!-- end mp_products_items --> </div>
    </div><!-- end mp-related-products --></div><!-- end mp_single_product_extra -->

    </div>

    (index):1 Error in event handler for (unknown): TypeError: Cannot read property 'verdict' of undefined
    at chrome-extension://cfnpidifppmenkapgihekkeednfoenal/aph.js:240:17
    sw?s=push:1 Uncaught (in promise) j {name: "ServiceWorkerQuietError", message: "Service workers can only progress forward."}

  • Panos

    Hi Linda ,

    I still haven't managed to find how it is possible to change product prices out of a sudden

    The code you have shared is the code used to display a product, it doesn't change the product.

    I check out upfornt's code also asked the lead dev who confirmed this doesn't happen through upfront.

    I also checked hummingbird and Events plugins I see you have installed and similarly they don't have any function to update products.

    Since I can't find the cause of this what I can do is provide a custom mu-plugin that will keep a backup of products prices, and will also check if that product has price 0 when displayed, it will run through it's data and restore to the correct price.

    Please let me know what you think of this.

    Thanks!

  • Panos

    Hi Linda ,

    It's been only a few minutes I added the custom mu-plugin on your server, so that mu-plugin has nothing to do with prices not been set to 0.

    In your wp-content/mu-plugins folder I have added a new file: mp-price-control.php. You can either check open that file to see it's content or you can check it out here: https://gist.github.com/panoslyrakis/c9fce8a68523245bd1c0b4554f5eaccb

    From the code you can see that it checks if the value of the price is <= 0 it will update the regular_price with the previous correct one.

    If you want, you can remove it temporarily in order to check if you need this solution or not.

    can I use the custom plugin for other sites too?

    Of course you can, but only if you are having such strange issue. If you're not having issues you won't be needing it and I would suggest not to use it.

    Cheers!