Config Assistant not Saving

Brian Shook's Avatar

Brian Shook

07 Apr, 2011 07:22 PM

Config Assistant works fine with the mt_blog "Classic" template set. However, when trying to use it with a custom template set it will show the Theme Options, but not save them (see attached screen shot). Please note the custom template set was created using the Theme Exporter and then placed in the plugins folder, it publishes fine. Config Assistant just doesn't seem to work with it, though. Any ideas as to what may be amiss? Thanks much for any help you provide.

  1. 1 Posted by Byrne Reese on 07 Apr, 2011 08:46 PM

    Byrne Reese's Avatar

    When you exported the templates as a theme, and then installed it locally, did you then apply that theme to the blog?

    Can you attach the config.yaml you are using with your theme? Feel free to make this case private, if you do not wish to share your config.yaml with the outside world.

  2. 2 Posted by Brian Shook on 08 Apr, 2011 12:16 PM

    Brian Shook's Avatar

    I first created a new blog using the new template set and found config
    assistant not working correctly. The theme options appeared just fine, but
    wouldn't save as stated before.

    I then went back to a existing classic blog which had values stored
    correctly and changed its template set to the new psu_podcast template set.
    After altering an value and clicking the save button all existing values
    were gone. I then switched the template set back to 'mt_blog' and after
    re-entering the values it saved correctly.

    On Thu, Apr 7, 2011 at 4:46 PM, Byrne Reese <
    [email blocked]> wrote:

  3. 3 Posted by Brian Shook on 11 Apr, 2011 02:47 PM

    Brian Shook's Avatar

    After some further investigation, methodically going through the save
    save_config routine, it appears the plugin config vars are not set. The
    following line returns an empty array.

    my @vars = $plugin->config_vars($scope);

    I don't know enough about the MT Registry to check if the options are set
    for the template set or not per the find_option_def function. How would one
    go about verifying that?

    On Thu, Apr 7, 2011 at 4:46 PM, Byrne Reese <
    [email blocked]> wrote:

  4. 4 Posted by Byrne Reese on 10 May, 2011 08:58 PM

    Byrne Reese's Avatar

    I took a look at your config.yaml, and it is possible the problem is stemming from your plugin/theme not having defined any options to persist. Is that correct?

    Probably not. Your screenshot certainly does not indicate that. So something is definitely squirrelly. The PSU Podcast config.yaml you shared... is this the theme you are using which is supposed to have theme options associated with it?

  5. 5 Posted by Brian Shook on 11 May, 2011 01:50 PM

    Brian Shook's Avatar

    Thanks for the response, that was the issue. I had the options defined in
    another plugin rather than the theme I exported. It worked fine in the other
    plugin for the classic template set, but needed to be in the config.yaml of
    the new template set to work with the new template.

    On another note is it possible to access the stored configuration values for
    a blog via a plugin and perl hashes, instead of a template tag? I guess what
    I'm asking is where is the configuration information stored and how do I get
    to it. Again many thanks for all your help.

    On Tue, May 10, 2011 at 4:58 PM, Byrne Reese <
    [email blocked]> wrote:

  6. 6 Posted by Byrne Reese on 11 May, 2011 09:32 PM

    Byrne Reese's Avatar

    If you need to access config data stored by the user within a template or theme, then the best way to do so is through a template tag. Bar none.

    If you need to access those values programmatically in Perl, then there is a simple API for that. I have updated Config Assistant's documentation to show you how:

    https://github.com/openmelody/mt-plugin-configassistant/blob/master...

    Look under: "Accessing Stored Data Programmatically"

  7. Byrne Reese closed this discussion on 11 May, 2011 09:32 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac