Hello,since update 2.8.8.9 and using WPML it…

WPPizza – A Restaurant Plugin for WordPress Support General Support Hello,since update 2.8.8.9 and using WPML it…

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3927
    Stefan

      Hello,
      since update 2.8.8.9 and using WPML it showed all productes twice on every page. I looked through all settings but can not find the mistake. Anybody have the same problems?
      thanks
      Stefan

      #3928
      Olly
      Admin & Mod

        Hi ,
        tested it here (albeit with WP3.8, as the version of WPML I have – 3.0.2-a – does not wok at all with WP3.9 and my download to the latest WPML version has expired)
        and it’works fine….

        question though, how many languages do you have enabled ? i.e if the products show 2x do you have 2 languages enabled ?

        do they show 3 times if you were to enable 3 languages , so is this correlated ?

        one quick thing to try (and report back please):
        in wppizza/classes/wppizza.actions.inc.php you find – on approx line 67 – the following code:


        add_action('wppizza_loop_outside_end', array( $this, 'wppizza_reset_loop_query'));

        what happens when you comment out that line (so it reads like this ?


        //add_action('wppizza_loop_outside_end', array( $this, 'wppizza_reset_loop_query'));

        (assuming that you are a little bit comfortable with editing php files)

        #3929
        Stefan

          thank you Olly,
          with ur code changing it all work find.
          stefan

          #3930
          Olly
          Admin & Mod

            ok, thanks for reporting back, will have to integrate something in the next update that takes care of this when using WPML

            that code is/was really only there to deal with some themes that appear to be misbehaving somehow

            #3931
            Olly
            Admin & Mod

              on second thoughts, would you be able to (and test) the following INSTEAD (as that would really be a better way to do things, but I would need to know if this works in your scenario too)

              same file, but approx line 989 you should find the following:


              public function wppizza_include_shortcode_template($type,$atts=null){
              /***************************************
              [include category loop template]
              ***************************************/
              if($type=='category'){

              could you replace this with

              public function wppizza_include_shortcode_template($type,$atts=null){
              /***************************************
              [include category loop template]
              ***************************************/
              if($type=='category'){
              wp_reset_query();

              i.e add wp_reset_query()

              INSTEAD of commenting out the action earlier ?

              if this works too, it would really be a better thing to do. I would be very grateful if you could test this too/instead so I can make sure the next update will not cause the same problem in your case again

              thanks

              #3932
              Stefan

                hi again,
                sorry to tell you NO, dont work …
                then it will be shown 2 times everything ….
                although I support 5 languages on my webpage …

                the tipp with // helps best 😉

                #3933
                Olly
                Admin & Mod

                  hmm,
                  I have tried with your theme, WPML and some of the plugins that i can see in your page and cannot reproduce the issue.

                  So , as you have edited the plugin directly you would not be able to update wppizza in the future without having to re-apply your edit.

                  Therefore, the next update will enable you to do this via your themes function file (this will probably come in handy in other scenarios too, so I’m happy to make this possible).

                  I.e add this to your functions.php (but leave the edit you have made)

                  remove_action( 'wppizza_loop_template_end', array( WPPIZZA_ACTIONS::this() , 'wppizza_reset_loop_query' ));

                  you can add this now, as it will not do anything until the next update.
                  once you update the wppizza plugin this line will automatically kick in, whilst your edit you made earlier when commenting out the line i referred to earlier will be reversed (as the plugin will be overwritten when you apply the next update

                  it’s a much better solution than editing the plugin directly

                  #3934
                  Olly
                  Admin & Mod

                    i had a bit of a look around. as i believe you are using wpml 2.9 this is/was a bug there

                    (see http://wpml.org/2013/07/wpml-2-9-1-bugfix-release/)

                    I would think – although not tested – that updating wpml is actually the right way to solve this, not editing the wpizza plugin….
                    (in which case you can probably save yourself adding that “remove_action” code i talked about earlier too

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • The topic ‘Hello,since update 2.8.8.9 and using WPML it…’ is closed to new replies.