Tagged: , , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #525450

    Hello!

    I have a client whos main theme is built on enfold. They recently reported that the forms were not showing. No input elements were visible, only the form itself. Started to dig in and diasbled all plugins and disabled the childtheme – same problem.
    After some searching in the code i found some strange stuff. In the \framework\php\class-form-generator.php i tested some var dumps and when i did a var_dump on $element on in the loop on row 168 i found that all values came with a . If i had a checkbox called ABC, i got this:
    string(11) “’ABC’”.
    Type could be string([way to many]) “’checkbox’” etc. All values were wrapped with ’.
    I tried this workaround and after that it worked:
    `foreach ($element as $key => $value) {
    $element[$key] = ereg_replace(“[^A-Za-z]”, “”, $value );
    }`

    And when i var_dumped this i got string(3) “ABC” which feels more right.
    Any clue what’s wrong here? This happened after update to the latest version.

    EDIT: since i only allowed characters here, maybe something will break. As i mentioned, this fixed the problem for now so i wonder if you guys at least could give me a valid regex? Numbers? Space? Hyphen? Etc…

    Update: I found out that this actually did not work either, even tho it worked better.
    I found that in \themes\enfold\config-templatebuilder\avia-shortcodes\contact.php the declatation of $form_fields on line 281 were messed up. Some how, the $content strings contains ’ instead of ‘. So it renders it like:

    [av_contact_field label=’My content here’ ...
    insetad of
    [av_contact_field label='My content here' ...

    so, the temporary fix that made it work was to before this line add:
    $content = str_replace('’', "'", $content);

    What happened here?

    • This topic was modified 9 years, 1 month ago by ahlbaum.
    #525552

    Hi ahlbaum!

    Is he using the latest version of Enfold, 3.3.2? If not then be sure to update. There was a bug in an older version where some shortcodes were not being displayed.

    Also make sure WordPress is updated and all plugins are deactivated while testing.

    Best regards,
    Elliott

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.