1 Reply Latest reply: Feb 27, 2012 3:55 AM by jcassella RSS

    Has anyone ever broken Mobile with their custom code?

    jcassella

      Sounds like an odd question, I know, but here's what happened:  We had the Mobile module turned on for our Jive 5.0 (5.0.1.1) instance, but we would get an error about "misconfiguration" when we tried to login via the Mobile UI.  I have an active case open for this, and the engineer determined that we could get mobile to work only by removing our two custom-developed plugins.  I was wondering if anyone had any ideas about what types of custom development would potentially interfere with the Mobile module?

       

      In general, this is what the two plugins do, and most of the relevant code:

       

      Plugin1 - Custom macro/filter button.  New menu item in the RTE that we use to tag text that is "for internal use only" and not to be shared outside the company. On rendering in the normal view-mode, text marked this way get a special CSS style assigned, and gets additional warning text added above the text (actually, it's mostly the code in this thread Re: How do I get my macro to convert internal format codes to HTML? )

       

      Plugin2 - Customized version of the Document UI to show/set 2 custom document properties.  This uses a custom DocCreate class, and the following struts config:

       

      <package name="kbdoc-actions" namespace="/" extends="community-actions">
      <action name="doc-create" class="com.jivesoftware.community.action.DocCreateActionColorcon">
                  <interceptor-ref name="paramsPrepareParamsStack"/>
                  <interceptor-ref name="token">
                      <param name="excludeMethods">cancel,default,imagePicker,input,forcePost,bridgedContentReply</param>
                  </interceptor-ref>
                  <result name="cancel" type="redirect">${cancelURL}</result>
                  <result name="success" type="redirect">/docs/${document.documentID}</result>
                  <result name="successAndEdit" type="redirect">/docs/${document.documentID}/edit?savedMsg=true&amp;containerType=${container.objectType}&amp;container=${container.ID}</result>
                  <result name="input">/template/docs/doc-create.ftl</result>
                  <result name="error">/template/docs/doc-create.ftl</result>
                  <result name="image-picker" type="redirect">image-picker!input.jspa?contentResourceSessionKey=${sessionKey}&amp;containerType=${container.objectType}&amp;container=${container.ID}&amp;instantiatedFromGUIEditor=${postedFromGUIEditor}</result>
                  <result name="bridge-reply" type="redirect">bridge-reply.jspa?contentResourceSessionKey=${sessionKey}&amp;object=${document.ID}&amp;contentObjectType=${document.objectType}&amp;containerType=${container.objectType}&amp;container=${container.ID}&amp;instantiatedFromGUIEditor=${postedFromGUIEditor}&amp;bridge=${bridge.ID}</result>
                  <result name="doc-type-error" type="redirect">doc-create.jspa?community=${community.ID}</result>
                  <result name="successDraft" type="redirect">/docs/${document.documentID}</result>
              </action>
              <action name="doc-edit" class="com.jivesoftware.community.action.DocCreateActionColorcon">
                  <interceptor-ref name="paramsPrepareParamsStack"/>
                  <interceptor-ref name="token">
                      <param name="excludeMethods">cancel,default,imagePicker,input</param>
                  </interceptor-ref>
                  <param name="edit">true</param>
                  <result name="cancel" type="redirect">/docs/${document.documentID}</result>
                  <result name="success" type="redirect">/docs/${document.documentID}</result>
                  <result name="input">/template/docs/doc-create.ftl</result>
                  <result name="doc-type-error" type="redirect">doc-create.jspa?container=${container.ID}&amp;containerType=${container.objectType}</result>
                  <result name="successDraft" type="redirect">/docs/${document.documentID}</result>
                  <result name="successAndEdit" type="redirect">/docs/${document.documentID}/edit?savedMsg=true&amp;containerType=${container.objectType}&amp;container=${container.ID}</result>
                  <result name="version-error" type="redirect">doc-create-version-error!update.jspa?document=${documentID}
                  </result>
              </action>
          </package>
      
        • Re: Has anyone ever broken Mobile with their custom code?
          jcassella

          So... I did finally find the problem in the code.  Turned out to have nothing at all to do with the "functional" code at all.

           

          I guess it's strange that it didn't cause issues before, but I wasn't using the struts.xml, cache-config.xml, spring.xml and plugin class. A re-read of the developer guide said explicitly to always include the plugin class even if you don't need it, and so I guessed on the others to also leave them in even when I didn't need them.