try another color scheme:


Go Back   TECH6.0 > Web Design/Development and SEO > Internet Forum Softwares > vBulletin


I've created an error and can't fix it.

This is a discussion on I've created an error and can't fix it. within the vBulletin section, part of the Internet Forum Softwares category; I have spent a lot of time looking at various .php files on my server, trying to understand flow. I ...

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 20-08-2008, 03:23 PM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default I've created an error and can't fix it.

I have spent a lot of time looking at various .php files on my server, trying to understand flow. I think that somewhere either directly in one of the files, or somewhere on the Admin CP, I have inadvertently made a change which has caused a problem.

I realize that you are not familiar with Form Hack, but I don't believe this problem is directly with the hack. I have 6 forms using the hack. They were all working fine. All of a sudden none of them work. Obviously something common to all is the problem.

All 6, create new threads. This is the error I see when I try to execute:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/.../public_html/forum/newthread.php(76) : eval()'d code on line 3588
Line 76 of newthread.php is this:

PHP Code:
($hook vBulletinHook::fetch_hook('newthread_start')) ? eval($hook) : false
I do not believe that the line is actually wrong, so I think there is something wrong in newthread_start. The problem is, I don't think I have changed anything, because I can't even find newthread_start.

So the questions are:
1. Can someone help me understand the error and tell me if I need to look somewhere else.
2. Where can I find newthread_start.
3. Or, is fetch_hook something in vB that I could have changed, or is it a PHP construct.
Reply With Quote
  #2  
Old 20-08-2008, 03:27 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

newthread_start is a hook in vB.

I think it is due to some of your mods gone bad (probably the form hack). Do one thing, try disabling the Form Hack from admincp->Product Manager and see the effect.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #3  
Old 20-08-2008, 03:50 PM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default Disabling Form Hack does work

I disabled the Form Hack plug-in and the problem went away with all other attempts to start a new thread. Of course I have 6 locations where Form Hack is giving me data input control over what goes into a post, and thus won't work at all with it disabled.

This is the product provided to me to use, and it has been relatively simple to use. So you are suggesting that I go elsewhere to dive into this deeper since you have not used it before?

You didn't directly answer one queston. Yes, newthread_start is a vB hook. Is there somewhere to "modify" the hook. Yes, I agree my mods have caused this problem, but I can't figure out what is common to the creation of all new threads both using the hack, and not, but which doesn't matter when the hack is disabled. Any ideas?
Reply With Quote
  #4  
Old 20-08-2008, 04:06 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

Is there somewhere to "modify" the hook.
Do not go for modifying the default vB. If you want to modify, modify the plugin instead from Plugin Manager.

Also, I just noticed that Form Hack isn't released for vB 3.7, so if you're using 3.7 then there may arise compatibility issues that you should and must discuss at official thread at vb.org for best answer.

I think that somewhere either directly in one of the files, or somewhere on the Admin CP, I have inadvertently made a change which has caused a problem.
Now, as you said, the form hack was working fine until you have modified it so all I can suggest is to uninstall and reinstall Form Hack.

what is common to the creation of all new threads both using the hack, and not.
It is the newthread_start hook which is common on creation of all threads both using the hack and not. Something got disturbed in the functioning of that hook due to the mod WHICH on disabling restored the hook's condition back to vb's default and thus it worked again.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #5  
Old 20-08-2008, 05:11 PM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default suggestions then?

I didn't really want to modify the hook, I was really asking because I fear that I somehow DID modify it, without even knowing it.

We are using the latest version of vB, so if what you say is true, there may be some issues with compatibility.

I'll have to find out about reinstalling the hack. It is just a feeling, but I don't think that is going to work.

So here is my dilemma. Since you do not use Form Hack, perhaps you can guide me toward a different solution. Perhaps you can give me a lesson, or you are aware of a website with the kind of information I need.

We have a number of forums, where the standard "Post thread" functionality is used. We get a form just like I am using right now; subject line and vBtext box.

We have some specific forums though, where specific information is required from the poster. The form Hack allowed us to "easily" create a form for data input. It then allowed us to post that information into the post, as well as allowing me to write code to store the specific values into the database. Is there a way to do this strictly through the standard vB product?
Reply With Quote
  #6  
Old 20-08-2008, 05:21 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

I'll have to find out about reinstalling the hack. It is just a feeling, but I don't think that is going to work.
If it did worked earlier until your modification, it should work again on a fresh install (only if you modified the hack's files and not original vB's)

As said earlier, the only place where you can get best support for that mod is here. Also, read through that thread, maybe someone else also faced the same problem.
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
  #7  
Old 21-08-2008, 09:44 PM
No Avatar

Techie
 
Join Date: Aug 2008
Location: United States
Posts: 54
MisawaPlayer is on a distinguished road
Send a message via Yahoo to MisawaPlayer
Default Thanks for all the help

Thanks for all your help with this problem. Everything is working fine now. I still do not understand why my problem occurred, but it did and I will know in the future.

In one copy of a form (with Form Hack, you copy the default Form Hack form and then modify for desired input/output), I made one PHP syntax error. I cannot understand why this one error, in one form, would affect 5 other forms, and the act of posting a new thread in general, but it did.

Because the problem was seen in so many different areas, I focused on common files / styles / templates, but that wasn't the actual source.

You helped me walk through the debugging steps, and I greatly appreciate it.

Looking forward to the next time I need help!
Reply With Quote
  #8  
Old 21-08-2008, 10:11 PM
webwizzy's Avatar

Administrator
 
Name: Vinayak
Join Date: Feb 2008
Location: India
Phone: Samsung Wave
Posts: 1,116
webwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nicewebwizzy is just really nice
Send a message via Yahoo to webwizzy
Default

see its not about just one error in that hack. Everything is hanging on that one HOOK. Bad code disturbed the proper functioning of that hook and thus everything associated with it started functioning abruptly.

anyways.. nice to know you solved your problem. Keep posting.. !!
__________________
Always TAG and SHARE your threads
Submit your site to TECH6 Directory
TECH6 on Facebook - Like Us

Would you like to Link To Us | Support TECH6 by going Premium
Know more about me at Vinayaks.com | Follow TECH6 at Twitter


Reply With Quote
Reply

Bookmarks

Tags
error, hook, parse


Thread Tools
Display Modes




All times are GMT +5.5. The time now is 09:04 AM.

Contact Us - Tech6.com - Link to Us - Advertise - Submit Site - Privacy Statement - TOS - Top