8 Replies Latest reply: Mar 22, 2013 3:00 PM by MalcA RSS

    Unable to switch themes - no Next button

    MalcA
      All,

      Apex version: 4.2.0.00.27.

      I have three applications: a master, App. 100, and App. 200. The master app contains a version of Theme 24 which has been customised. App 100 subscribes to this at present, and subscribes to just those templates that it needs. I want to import it into App 200 and use it there too, so I have exported it from 100 and imported it into 200 and am trying to switch to it in 200. 200 currently uses Theme 26.

      Initially when switching I see two types of message: "Warning: no template found with matching template class" and "Warning: multiple matching templates found".

      I resolved the "...no template found..." issues by including a template of the missing class in the master theme, publishing it and trying to switch again. I am left with just the "multiple matching templates found" warnings, and the selection lists are populated allowing me to chose which template to match with, but the Next button is still not available.

      I thought it was possibly a class from a theme component or region default, so even though 200 is not using the template from the theme default, APEX still requires templates of the same class (as all the theme defaults) in the new theme, could that be it? It is certainly something to do with the master theme only having a subset of all available templates, because I can switch to another theme (the original from the repository before customisation) that includes all templates.

      regards,
      Malcolm.
        • 1. Re: Unable to switch themes - no Next button
          Jorge Rimblas
          The warning wouldn't stop you from switching themes.
          Just to be clear, you probably do know this, but I'll say it to set the context, those template classes are not related to CSS classes. That template class lets APEX match one template to another. So, a Button can be matched to a Button, Button Alt to Button Alt, Page with Tabs matched to Page with Tabs and so on.

          That warning is normal.

          If I understand your situation you have a Button with "Next" in the name. When you attempt to switch themes you don't have a matching Next button, but you do have options right?
          I think you just need to see which class the Next button is using and make sure you have an equivalent template created on the destination theme.

          Hope this helps a little.
          -Jorge
          • 2. Re: Unable to switch themes - no Next button
            MalcA
            Hi Jorge, thanks for the reply.

            I know that template class is in no way related to CSS class yes - just used to aid theme switching.

            I should have been clearer - it is the Next button on the Switch Theme page that is missing, not a button in my APEX application.

            So I am seeing the Switch Theme page with ticks against each template in the Status column, but with two rows with "... multiple matching templates found", which as you point out should not stop me switching themes, and hasn't stopped me in the past, but there is no Next button there.

            regards,
            Malcolm.
            • 3. Re: Unable to switch themes - no Next button
              Jorge Rimblas
              Ah! Sorry. Ha!

              Ok, crazy thought, would it be possible that you still have some "Warning: no template found with matching template class" errors on the next page of the report?
              Maybe you're not done adding missing templates.

              Thanks
              -Jorge
              • 4. Re: Unable to switch themes - no Next button
                MalcA
                That struck me too, but it says "row(s) 1 - 11 of 11" I'm afraid.

                It does let me switch to a full copy of Theme 24 from the repository instead of the subset that is my custom theme. I could try to subscribe to all templates instead of a subset, then remove the unused ones (those I think are unused anyway) one by one until it stops me switching. I was really hoping to avoid that though!
                • 5. Re: Unable to switch themes - no Next button
                  Jorge Rimblas
                  Doesn't sound like fun. I'm not sure what's going on either, but I think your suspicions are correct.

                  Good luck
                  -Jorge
                  • 6. Re: Unable to switch themes - no Next button
                    MalcA
                    The current status is:

                    I have an application with two themes and I can't switch from one to the other - the Next button on the Switch Theme page is missing even though there are either ticks in the status column, or "Warning: multiple matching templates found".

                    I can make a copy of this application (either with a straight copy or by importing an export file), try and switch themes in the new copy and the Next button on the Switch Theme page appears fine - no problem switching.

                    I've exported apps and themes in the original and copy and examdiff'd them. Apart from the IDs changing there are three differences in the copy: two lines with
                    p_plug_query_row_count_max => 500 in them, and one with p_translate_this_template => 'N'. Something about a template is interesting, but if I edit the export file, remove the p_translate_this_template line, and import to a new application, I can still switch themes.
                    • 7. Re: Unable to switch themes - no Next button
                      Jorge Rimblas
                      Applications getting corrupted like that doesn't happen often, but I've seen it. You got lucky that the export and copy cleans things up again.
                      If for some reason you're able to reproduce it then you can log it as a bug and reported here on the forum.

                      Thanks
                      -Jorge
                      • 8. Re: Unable to switch themes - no Next button
                        MalcA
                        I've left the original as-is - I'll keep returning to it if I get any ideas about what may be happening, but since a copy has sorted it out I'm not sure what else to look at. Thanks for the replies.

                        regards,
                        Malcolm.