• Resolved stigekalder

    (@stigekalder)


    Hi,

    I currently execute this code on a page, in order to start some php code in a sub folder:

    [insert_php]
    $FileIncPath = get_stylesheet_directory();
    //echo "$FileIncPath/nodearkiv/noder.php";
    include("$FileIncPath/nodearkiv/noder.php");
    [/insert_php]

    When I try to create a snippet with the 3 above lines, I get:
    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 24:
    Uncaught Error: Call to undefined function make_select() in /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/themes/spacious-child/nodearkiv/form.html:24 Stack trace: #0 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/themes/spacious-child/nodearkiv/noder.php(52): include() #1 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(227) : eval()’d code(3): include(‘/customers/1/1/…’) #2 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(227): eval() #3 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(267): WINP_BaseOptionsMetaBox->validateCode(‘$FileIncPath = …’) #4 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/libs/factory/forms/includes/control.class.php(221): WINP_BaseOptionsMetaBox->codeSnippetFilterValue(‘$FileIncPath = …’, ‘$FileIncPath = …’) #5
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    I am not sure which line (24) is being referred to.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author webcraftic

    (@webcraftic)

    Hi,

    Send me your file so that I can test it on my website. I think the problem is inside the noder.php file

    My email: [email protected]

    Best regards, Alex

    Plugin Author webcraftic

    (@webcraftic)

    Hi,

    I answered your letter. Please, did this help you solve the problem?

    Best regards, Alex

    Thread Starter stigekalder

    (@stigekalder)

    Hi Alex,

    I replaced noder.php in the nodearkiv folder with your modified version.
    I now get another error when I save the snippet:

    The code snippet you are trying to save produced a fatal error on line 1:
    Uncaught Error: Call to undefined function phpinclude() in /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/themes/spacious-child/nodearkiv/noder.php:1 Stack trace: #0 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(227) : eval()’d code(3): include() #1 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(227): eval() #2 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/admin/metaboxes/base-options.php(267): WINP_BaseOptionsMetaBox->validateCode(‘$FileIncPath = …’) #3 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/libs/factory/forms/includes/control.class.php(221): WINP_BaseOptionsMetaBox->codeSnippetFilterValue(‘$FileIncPath = …’, ‘$FileIncPath = …’) #4 /customers/1/1/2/detfynskekammerkor.dk/httpd.www/wp/wp-content/plugins/insert-php/libs/factory/forms/controls/textarea.php(52): Wbcr_FactoryForms

    Regards, stigekalder

    Plugin Author webcraftic

    (@webcraftic)

    Hi,stigekalder

    The error is clear to me. That is, your download method, removes flaws and line breaks in the file. Try downloading the file through the ftp manager or through the hosting manager.

    If you look at your file, then all your code will be placed on 1 line. This is affected by your download method.

    Best regards, Alex

    Thread Starter stigekalder

    (@stigekalder)

    Hi Alex,

    I see what you mean. When I upload it with Filezilla (which I always use, althoug never or rare with php files), it is corrupted. I then used the file manager provided by one.com, and that did the trick. Anyway, now the functionality on the webpage works, but also with the original noder.php ?!

    Let’s leave it there, I changed ticket status to resolved – thanks for your efforts.

    Regards, stigekalder (Niels)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Save of snippet gives fatal error’ is closed to new replies.