News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

sera

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! 

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

sera

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:

function list_CustomForm_fields($nul, $nul, $nul, $id)


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

Quote from: Aleksi "Lex" Kilpinen on December 23, 2017, 08:54:54 AM
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

function list_CustomForm_fields($nul, $nul, $nul, $id)


Replace with

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!

Prids

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

Plus

i update my smf version i lost my users posted link in topic.
how can i recover ?

Kindred

you updated from what to what? How did you update?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Plus

Quote from: Kindred on August 04, 2018, 03:35:56 PM
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

Kindred

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?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Prids

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 :)


MisterVertigo

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!

Blade73

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]

   
QuoteloadLanguage('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?


Kindred


// 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...)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Not sure why Modifications needs to be loaded, this hasn't been required since late betas of 2.0...

Blade73

Quote from: Kindred on November 27, 2018, 07:43:24 AM

// 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

Blade73

is there a simulare mod out there like this since this aint working at all at my forum now
been trought all manually to check but still end ups with white pages ?

Kindred

No, this is the only mod of this sort.

However, a white page is indicative of a php level error. Find the actual error in the server error log file...   the. We might have some idea what is actually happening.  I have used this. Or of 5 different sites, on 4 different servers without encountering the issue that you report.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jeremy M.

I installed this mod on my forum (2.0.15). . I get the following:

Fatal error: Redefinition of parameter $nul in /storage/ssd4/929/1691929/public_html/Sources/ManageSettings.php on line 2705


Also get

Field 'title' doesn't have a default value
File: /storage/ssd4/929/1691929/public_html/Sources/ManageSettings.php
Line: 2533

Shambles

Quote from: Alexa Lynne
I installed this mod on my forum (2.0.15). . I get the following:

Fatal error: Redefinition of parameter $nul in /storage/ssd4/929/1691929/public_html/Sources/ManageSettings.php on line 2705

Read the earlier posts - it's been reported & fixed several times.

Eg, https://www.simplemachines.org/community/index.php?topic=248871.msg3970510;topicseen#msg3970510

Jeremy M.

Quote from: Shambles on February 10, 2019, 07:03:50 AM
Quote from: Alexa Lynne
I installed this mod on my forum (2.0.15). . I get the following:

Fatal error: Redefinition of parameter $nul in /storage/ssd4/929/1691929/public_html/Sources/ManageSettings.php on line 2705

Read the earlier posts - it's been reported & fixed several times.

Eg, https://www.simplemachines.org/community/index.php?topic=248871.msg3970510;topicseen#msg3970510


The fix above does not work.

Aleksi "Lex" Kilpinen

#1839
How does it not work? It's worked for others.

EDIT: fixed typo.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: