Announcement

Collapse
No announcement yet.

Module feature type bug

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Module feature type bug

    I posted this in the bugs for PR 4 but it is also in 5.5.

    Any new module:feature is not working when module is updated. I have a module with several features which is installed in the store. I add a new, secondary feature type, e.g. system to the list of features. I change the version number of the module. I upload and update in admin. When looking at the module information tab, it shows system in the list. But when I go to the system extension menu the module is not automatically checked like it is when initially added. The only way to get the "system feature" to take is to completely uninstall (remove templates, items, etc) from the store and domain and then start over and reload it. This is a major issue since the module involves several customized templates by the store. All are lost in the uninstall.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    #2
    Re: Module feature type bug

    Impact: It took ME 30 minutes to uninstall, reinstall, and recreate the lost data that could be recreated. It will take the average store owner much longer. This module is installed in 1300 stores. This bug needs to be fixed. As a last resort, clicking the update button in the store's XXXX configuration screen should make sure the actively selected module is registered in the storemod database for all of its features. Ideally it would have happened with the update under admin > modules.
    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
    Facebook http://www.facebook.com/EmporiumPlus
    Twitter http://twitter.com/emporiumplus

    Comment


      #3
      Re: Module feature type bug

      I'll make sure we get on it.
      Thanks,

      Rick Wilson
      CEO
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Re: Module feature type bug

        Thanks Rick. Apparently Kent reported this bug several months ago before you guys took over. I don't know how it got missed this long as this is a real PIA.
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment


          #5
          Re: Module feature type bug

          Rick,

          This bug did not get fixed in RC1.
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment


            #6
            Re: Module feature type bug

            Bill,

            This is not a MM5.5 bug and there is a workaround to this issue.

            When a module is updated Module_Upgrade_Store function is invoked. You can add some conditional code to this function to install the new feature type.

            MM5.5 is now at a code freeze, so unless there are any major/showstopper issues, they would have to be pushed to the following release.

            Thanks.
            Last edited by Alex Kruglyak; 04-18-08, 01:28 AM.
            Alex Kruglyak
            Software Engineer
            Miva Small Business Solutions
            http://www.mivamerchant.com

            Comment


              #7
              Re: Module feature type bug

              Would you like to share that conditional code with us so we don't break something else? There's not a lot (or any) documentation of admin API functions that do this. Then if we do this, isn't it going to break something when you finally do fix the bug? For example, double entry of a feature for the module?
              Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
              Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
              Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
              Facebook http://www.facebook.com/EmporiumPlus
              Twitter http://twitter.com/emporiumplus

              Comment


                #8
                Re: Module feature type bug

                Well, after beating my head against the wall for a couple hours, I worked through the bugs. FWIW you have a bug/anomaly/feature in this function call: <MvFUNCTION NAME = "Module_Upgrade_Store" PARAMETERS = "module var, version" STANDARDOUTPUTLEVEL = "">
                The parameter module variable contains all of the members except the most important one for this to work, l.module:id So when you test for existence of the feature in storemodules it finds it is not there (since the module:id is 0). Then when you try to add it, it does not add the feature for the intended module. Instead it adds it for a module with id = 0. Hence inserting a bogus record.

                Why is l.module:id blank at the beginning of that function? Is that by design or is it a bug?
                Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                Facebook http://www.facebook.com/EmporiumPlus
                Twitter http://twitter.com/emporiumplus

                Comment


                  #9
                  Re: Module feature type bug

                  Originally posted by wcw View Post
                  Would you like to share that conditional code with us so we don't break something else? There's not a lot (or any) documentation of admin API functions that do this. Then if we do this, isn't it going to break something when you finally do fix the bug? For example, double entry of a feature for the module?


                  Try this:
                  <MvIF EXPR = "{ NOT [ g.Module_Library_DB ].StoreModule_Load( l.module:id, l.feature_type, l.null ) }">
                  <MvIF EXPR = "{ NOT [ g.Module_Library_DB ].StoreModule_Insert_Feature( l.module, l.feature_type ) }">
                  <MvFUNCTIONRETURN VALUE = 0>
                  </MvIF>
                  </MvIF>

                  The first statement will insure that this feature type isn't already installed, so even if this issue gets fixed by us in the future it's not going to affect your modules.
                  Second statement installs the new feature type in a store. Module_Upgrade_Store is called for each store, so you don't need any additional code for that.

                  Additional code you'll have to write is checking that the version is LE to the version the new feature_type was added to (ex: if l.version LE 5.0001 ).
                  Also check whether the module is actually installed in the store, otherwise there's no point to install.

                  Hope this helps.

                  Thanks.
                  Alex Kruglyak
                  Software Engineer
                  Miva Small Business Solutions
                  http://www.mivamerchant.com

                  Comment


                    #10
                    Re: Module feature type bug

                    Did you see my post just before yours? The l.module:id in the Module_Upgrade_Store function is blank. All the other l.module members exist. Just no ID. Once I figured that out and added a lookup for the module ID, the StoreModule_Insert_Feature worked. Until then, I thought there was a bug in the insert feature function.
                    Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                    Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                    Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                    Facebook http://www.facebook.com/EmporiumPlus
                    Twitter http://twitter.com/emporiumplus

                    Comment


                      #11
                      Re: Module feature type bug

                      I saw your post a min after, but I couldnt verify.
                      It's deffinetely a bug IMO but I'd have to do a little more research to see why it was done this way.

                      Thanks.
                      Alex Kruglyak
                      Software Engineer
                      Miva Small Business Solutions
                      http://www.mivamerchant.com

                      Comment

                      Working...
                      X