• Resolved Alex Albuquerque

    (@alexalbuquerque)


    Hello to all,

    First of all, thank you for the opportunity to write and participate.

    I already did read all informations in FAQ and OTHER NOTES, shortcodes informations 3 times and already tried a lot of options in the wizard shortcode creation, but absolutely nothing can make the menu appear in the page. I generated a simple shortcode, like this:

    [cmwizard menu=4 allow_all_root=1/]

    Pretty simple, but inserting the shortcode in the content area do nothing.

    Please, maybe I am missing something? Can someone put me in the right direction?

    Thank you in advance.

    Alex

    https://wordpress.org/plugins/custom-menu-wizard/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author wizzud

    (@wizzud)

    Hmmm…

    May I ask what other plugins you have installed and activated, and are you using the latest version of WordPress (ie. 4.0)?

    By “do nothing” do you mean that there is literally no output at all, ie. the shortcode disappears but nothing replaces it? Or does the shortcode itself remain on the page?
    Have you checked the View Source of the page to ensure that what you can see is actually what the page’s HTML holds?
    If you bring up the same page in admin’s Appearance/Customise screen, do you get the same result as when looking at the page at the frontend (ie. still no output)?
    If you set up a widget with the same (default) configuration, does it work?
    If you set up a text widget containing the shortcode [cmwizard menu4/] (which is the default settings for “show the entire menu”) does it show the menu? (It may just show the shortcode, in which case you might want to see if your theme has an option to allow shortcodes in widgets, or check if some other plugin – like WP Edit – has such an option?)
    Are you running a caching plugin, and if so have you cleared the cache?
    Do you have a URL for where this is occurring?

    Sorry for all the questions!

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Hello wizzud, no worries about the questions. I will try to answer all. Lets start:

    Yes, I am using the latest version of WordPress 4.0 and these plugins:

    Active
    Category Tag Pages
    Contact Form 7
    Contact Form Builder
    Custom Menu Wizard
    LayerSlider WP
    Revolution Slider

    Inactive
    Akismet
    Coming Soon / Maintenance mode Ready!
    Hello Dolly

    You: “By “do nothing” do you mean that there is literally no output at all, ie. the shortcode disappears but nothing replaces it? Or does the shortcode itself remain on the page?”

    A: I checked the source code. The shortcode do not remain on the page. There is nothing on the code, no output are been sent by WordPress.

    You: “If you bring up the same page in admin’s Appearance/Customise screen, do you get the same result as when looking at the page at the frontend (ie. still no output)?”

    A: Yes, I did this test. Using Appearance/Customise screen the result is the same: no output.

    You: “If you set up a widget with the same (default) configuration, does it work?”

    A: Yes, it works! I set a widget with the same menu configuration and the menu appeared. Please see follow this link and you will see a small vertical menu in the right sidebar. It is the widget running.
    http://www.bgcb.adv.br/wpp/?page_id=15

    You: “If you set up a text widget containing the shortcode [cmwizard menu4/] (which is the default settings for “show the entire menu”) does it show the menu? (It may just show the shortcode, in which case you might want to see if your theme has an option to allow shortcodes in widgets, or check if some other plugin – like WP Edit – has such an option?)”

    A: Do not work too. I did this test and there are no output too. Follow this page. The menu should appear below the title “Áreas de Especialização” http://www.bgcb.adv.br/wpp/?page_id=10

    You: “Are you running a caching plugin, and if so have you cleared the cache?”

    A: No, I don´t use cache. I am using a WordPress theme named Law Business, from cmsmasters, which use a WYSIWYG content composer and a WordPress theme customiser. But I already did a test using the shortcode out of the theme WYSIWYG content composer and the problem still there.

    You: “Do you have a URL for where this is occurring?”

    A: Yes, I provided two URL´s above 🙂

    Thank you for your time.

    Alex

    Plugin Author wizzud

    (@wizzud)

    Hi Alex.
    I can’t see anything in your plugins that would interfere with CMW shortcode usage.
    I’ve noticed that your theme appears to be the LawBusiness – Attorney & Lawyer WordPress Theme, by cmsmasters? If I’m correct, one niggling little doubt occurs to me : the theme states that it provides 23 custom shortcodes, and the coincidence of the first 2 letters of “cmsmasters” and “cmwizard” being the same prompts me to wonder whether they have their own [cmwizard/] shortcode which is overriding mine? I am unable to get at any documentation that states what the 23 shortcodes they provide actually are, so is there any way you can check? One quick test would be to switch your site back to WordPress’s TwentyFourteen theme and see if my [cmwizard/] shortcode then works. If it does – and I sincerely hope it does! – then your answer is your theme.

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Hello, wizzud.

    You was right: theme was the problem. I changed to a default theme and the shortcodes works!

    Well, I will try to change the shortcode behaviour, changing the name of the cmsmarters shortcode to avoid conflict. Thats my only way because I need this theme and need this plugin.

    I will post the result.

    Thank you for your time.

    Alex

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Hello, wizzud.

    It seems the template is not the problem.

    I found the shortcode name “cmwizard” into “custom-menu-wizard.php”, lines 299, 409, 433, 800 and 801. I changed it to “testcmwizard”. This change works fine in the default WP template, but inside Law Business theme still not working.

    This test clear the situation about the shortcode name conflict. This is not the problem.

    I could do a little customization in Law Business template in order to insert the menu in the right position by code… but I prefer to not change the template php files. I am still looking why the shortcode not work into csmasters Law Business theme.

    Thank you.

    Alex

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Hello, wizzud.

    I did several tests with other plugins which insert shortcodes. All plugin works, except Custom Menu Wizard.

    Unfortunatelly, its clear that there are a very stong shortcode conflict between Custom Menu Wizard and CMSMasters Template. I will continue to look for a solution because I really need to insert a custom menu on content page, but using a shortcode (not editing pgp templates).

    I was thinking in do something like that to solve this shortcode conflict:
    http://www.wpexplorer.com/avoid-theme-plugin-conflicts/

    In this page, text says “As plugins files are loaded before themes files they are overwritten and not fully taken into account in this case.” I bet the cmwizard are been overwritten by cmsmarters shortcodes, probably with any “cmwizard” registered name.

    Well, lets works :/

    Thank you.

    Alex

    Plugin Author wizzud

    (@wizzud)

    Within the theme, can you do a caseless text search for walker?

    CMW uses a custom Walker to produce the output, and I have already come across another theme that also implemented a custom Walker and was thereby cancelling CMW’s (ref this thread). I don’t know whether it’s a similar problem or not. There are plenty of ways for any theme, or other plugin, to hook into the production of menus and alter the outcome, and because yours is a purchased theme I can’t just download it and take a look for myself. (If you feel able to email me a zip of the entire theme folder then I’ll gladly see what I can find? – rb[at]wizzud.com)

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Hello, Wizzud

    I sent by email to you.

    I hope you can find any solution, maybe creating an initial routine to check if the theme will conflict with the plugin and giving to users the option to change de name of the shortcode by interface.

    At this time, I back to old school and installed the original Custom Menu plugin, for a while. I have a very short time to release this project. But, since you find any solution, I will have a pleasure to change the plugin.

    Its working with original Custom Menu, like that:
    http://www.bgcb.adv.br/wpp/?page_id=10

    As you can see, the problem is the “cmwizard” shortcode name.

    Thank you for your time.

    Alex

    Plugin Author wizzud

    (@wizzud)

    Actually I think the problem lies with the fact that CMW is a Widget!

    The cmwizard shortcode uses the CMW widget to do its processing (by calling WordPress’s the_widget() function). That makes sense because the shortcode is, after all, just another means of calling the widget.

    I believe the problem with your theme is that it calls do_action("widgets_init") when it registers its own custom widgets. And it does so twice. I don’t think it should be calling it at all!

    In the theme’s framework/class/ folder there are 2 files : widgets-default.php and widgets.php. At the bottom of each one, there’s a function that’s hooked into the “init” action; each function registers some custom widgets, and then runs do_action("widgets_init"). The consequence of re-running do_action("widgets_init") is that instantiated widgets get removed from the list of registered widgets. This isn’t helped by what I believe to be a bug in WordPress’s WP_Widget_Factory::_register_widgets() method, however that doesn’t alter the fact that there’s no need to re-run that action.

    If you comment out those two calls to do_action("widgets_init") then the cmwizard shortcode will work just fine.

    I think it’s worth contacting the theme’s author and suggesting that their custom widgets should possibly be registered on the widgets_init hook (as documented by WordPress), not the init hook, and that there is no need to call do_action(“widgets_init”) themselves (in fact they shouldn’t!). Of course, there may be a good reason why they do it that way…

    Unfortunately there is nothing I can do – in terms of any amendment to CMW – to correct this, I’m afraid it’s all down to the theme. Sorry!

    Plugin Author wizzud

    (@wizzud)

    Update
    I had a re-think, as a result of which I have just-released v3.1.1, which has a work-around for your situation. For the shortcode, it will now re-register a missing CMW widget (provided that the widgets_init action has been done at least once).
    Enjoy!

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Nico job, wizzud.

    I will test this monday/tuesday and post the result here.

    Thank you for your time!

    Alex

    Thread Starter Alex Albuquerque

    (@alexalbuquerque)

    Done! It´s works!

    The new v3.1.1 version solved this conflict.

    Thank you so much!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Shortcode is not working. Can someone help me?’ is closed to new replies.