Advertisement:

Author Topic: Custom Form Mod  (Read 545337 times)

Offline sera

  • Newbie
  • *
  • Posts: 5
Re: Custom Form Mod
« Reply #1820 on: April 27, 2018, 01:30:10 PM »
So doing more research into this, i've found the error

Quote
[removed for privacy]/ashford/index.php?action=admin;area=packages;sa=install;package=CustomFormMod_v1.7_SMF2x.zip
8: Undefined index: package_readme
Apply Filter: Only show the errors from this file
File: [removed for privacy]/ashford/Sources/Packages.php
Line: 356

The code for this reads:

Quote
elseif ($action['type'] == 'readme')
      {
         if (file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']))
            $context['package_readme'] = htmlspecialchars(trim(file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']), "\n\r"));
         elseif (file_exists($action['filename']))
            $context['package_readme'] = htmlspecialchars(trim(file_get_contents($action['filename']), "\n\r"));

         if (!empty($action['parse_bbc']))
         {
            require_once($sourcedir . '/Subs-Post.php');
            $context['package_readme'] = preg_replace('~\[[/]?html\]~i', '', $context['package_readme']);
            preparsecode($context['package_readme']);
            $context['package_readme'] = parse_bbc($context['package_readme']);
         }
         else
            $context['package_readme'] = nl2br($context['package_readme']);

         continue;
      }

Any insight into this would be incredibly appreciated! 

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,330
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Form Mod
« Reply #1821 on: April 27, 2018, 03:35:00 PM »
that is not causing your error.

an undefined index will not cause a WSOD.

The WSOD is a server side error that is caused by a significant enough code issue that php crashes. when it tries to render it.
Check your SERVER error log, not the SMF log.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline sera

  • Newbie
  • *
  • Posts: 5
Re: Custom Form Mod
« Reply #1822 on: April 28, 2018, 07:22:23 PM »
Thank you so much for the feedback, Kindred!  I dug through the server logs and came up with this error:

[Sat Apr 28 15:51:41 2018] [warn] [client [...]] mod_fcgid: stderr: PHP Fatal error:  Redefinition of parameter $nul in [...]/ashford/Sources/ManageSettings.php on line 2699, referer: http://[...]/ashford/index.php?action=admin;area=packages;sa=install2;package=CustomFormMod_v1.7_SMF2x.zip;pid=0

That brought up this line:
Code: [Select]
function list_CustomForm_fields($nul, $nul, $nul, $id)

So i dug back through for this old post, and it worked! 

I haven't tried to actually use it ( so try this at your own risk ).

In theory, you should be able to bypass that problem and get all the info to show by simply editing the code like this

Find
Code: [Select]
function list_CustomForm_fields($nul, $nul, $nul, $id)

Replace with
Code: [Select]
function list_CustomForm_fields($nul3, $nul2, $nul, $id)

Those are empty parameters anyways. However, I have no idea if the forms will work after this edit....

So, at least if anyone else runs into the error, this is a workaround.  =)  Thank you, all!

Offline Prids

  • Semi-Newbie
  • *
  • Posts: 73
Re: Custom Form Mod
« Reply #1823 on: May 10, 2018, 04:26:39 PM »
I was quite dismayed when I could not load this mod in a new install of SMF 2.0.15 (straight, or by version emulation) without encountering post install errors (although it reported to have loaded cleanly).

However, this fix did the trick.  Thank you sera and all others who contributed to this issue!

Great mod indeed, had it for ages on another install.

Regards

Paul

Offline Plus

  • Jr. Member
  • **
  • Posts: 123
  • Gender: Male
    • turkishairforce.org on Facebook
    • Oy Turkiyem
Re: Custom Form Mod
« Reply #1824 on: August 04, 2018, 12:39:02 PM »
i update my smf version i lost my users posted link in topic.
how can i recover ?

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,330
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Form Mod
« Reply #1825 on: August 04, 2018, 03:35:56 PM »
you updated from what to what? How did you update?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Plus

  • Jr. Member
  • **
  • Posts: 123
  • Gender: Male
    • turkishairforce.org on Facebook
    • Oy Turkiyem
Re: Custom Form Mod
« Reply #1826 on: August 09, 2018, 05:13:54 AM »
you updated from what to what? How did you update?
2.0.14 to 2.0.15 clean update.
but my users form data text, photos okey but hotlinks lost in topic

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,330
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Form Mod
« Reply #1827 on: August 09, 2018, 10:20:53 AM »
clean update?  Meaning that you used the full upgrade archive and overwrote all your 2.0.14 files?
(not the best way to do things unless you intended to wipe out all mods and other customization)


I'm not sure what you mean by "hotlinks lost in topic"
url demonstrating the issue?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Prids

  • Semi-Newbie
  • *
  • Posts: 73
Re: Custom Form Mod
« Reply #1828 on: August 15, 2018, 06:47:43 PM »
If you are having issues with formatting your output with this mod, read-on.

The detailed user guide says that if you format your output using the WYSIWYG editor, change the view to BBCode before saving.
On this new install, even so I kept losing formatting and in the end wrote the whole thing in BBCode in the BBCode view.  Fine.
Then I discovered, by accident, that if I changed from using Chrome as my browser to Firefox, it all worked fine, including the WYSIWYG.
Still change view before saving though.

Thought that might help someone who is tearing their hair out :)


Offline MisterVertigo

  • Newbie
  • *
  • Posts: 8
Re: Custom Form Mod
« Reply #1829 on: August 23, 2018, 10:32:16 PM »
I just want to say THANK YOU! I've been testing SMF for a while to see if it will work for our group and I came across this mod today. THIS IS A GAME CHANGER. This is hands-down the best mod I've ever installed for any forum software package. I can't wait to re-launch our site and show this off to everyone. Minds are going to be BLOWN! Thank you again!

Offline Blade73

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
Re: Custom Form Mod
« Reply #1830 on: November 27, 2018, 04:14:27 AM »
Had this on my forum but after clean install i get this error

3.    Execute Modification    ./Sources/Admin.php    Test failed
2.    Add After    ./Sources/Admin.php    Test failed
Code: (Find) [Select]
Quote
   // Load the language and templates....
   loadLanguage('Admin');
   loadTemplate('Admin', 'admin');
Code: (Add After) [Select]

   
Quote
loadLanguage('Modifications');

but in my admin.php it says
Quote
// Load the language and templates....
   loadLanguage('Admin');   
      loadLanguage('Treasury');
   loadTemplate('Admin', 'admin');

so i manuallly put that line in after but no go and also after loadLanguage('Treasury');
still a nogo
after installing the pages get white  and i have to go backwards to uninnstall and its all good again

the only error in log on forum is
 Undefined index: package_readme
Line: 356 ==>356:    $context['package_readme'] = preg_replace('~\[[/]?html\]~i', '', $context['package_readme']);

Any ideas?


Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,330
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Form Mod
« Reply #1831 on: November 27, 2018, 07:43:24 AM »
Code: [Select]
// Load the language and templates....
   loadLanguage('Admin');   
      loadLanguage('Treasury');
   loadTemplate('Admin', 'admin');
   loadLanguage('Modifications');

it should read like that.

(also, use code tags, not quote tags, please...)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,588
    • StoryBB/StoryBB on GitHub
Re: Custom Form Mod
« Reply #1832 on: November 27, 2018, 08:02:38 AM »
Not sure why Modifications needs to be loaded, this hasn’t been required since late betas of 2.0...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Blade73

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
Re: Custom Form Mod
« Reply #1833 on: November 29, 2018, 06:48:25 AM »
Code: [Select]
// Load the language and templates....
   loadLanguage('Admin');   
      loadLanguage('Treasury');
   loadTemplate('Admin', 'admin');
   loadLanguage('Modifications');

it should read like that.

(also, use code tags, not quote tags, please...)

I did that but when it loads up after installing it says moving you to the modificatons page and all gets white will try to not add it and reply

edit well not putting in that line got the same white page it wont redirect you to the page for the forms and all pages get white