Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2014, 03:05 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default mktime() expects parameter 4 to be long... etc

I get this on profiles of users have not entered their birthday. I've searched in many threads and have not found any solution. I've tried moving users to and from usergroups, checking the database to find any erroneous birthday entries, which I did find, but upon correcting them I still get the error. I've seen several times that users who have investigated the error have determined it is not caused by plugins.

This error has been popping up since 2006. What could be causing it? It leaves a horrible space in the header and to the left of the forum, so of course, it's not something that can be ignored.
Reply With Quote
  #2  
Old 11-09-2014, 03:07 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you post the full error here including the file name and line number?
Reply With Quote
  #3  
Old 11-09-2014, 03:12 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a thread that mentions it: http://www.vbulletin.com/forum/forum...r-4-to-be-long

I guess the solution there is to move the affected users to a new user group then back again. I also saw it mentioned that if you edit the user's profile in the admincp and save without changing anything, it will be fixed (although you have to do it for each affected user).

If you look in the database and see what the affected users have in their for their birthday, you might be able to figure out some SQL to fix it.
Reply With Quote
  #4  
Old 11-09-2014, 03:29 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I couldn't post the full error in the title, but I guess I should have in the post.

Quote:
Warning: mktime() expects parameter 4 to be long, string given in ..../includes/class_userprofile.php on line 260
Yeah, I did that usergroup thing. It seems that every user without a birthday has the bug, and there are hundreds, but I could try it. It could be a bug in the MyBB to vBulletin converter. Here's what I have in phpMyAdmin:



Edit: By the way, I did the maintenance checks, including fixing user profiles.
Reply With Quote
  #5  
Old 11-09-2014, 03:37 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...you could try
Code:
UPDATE user SET birthday='' WHERE birthday = '--'
Of course it's a little dangerous anytime you change the database like that, so if you don't feel comfortable then you may not want to do it, and if you do you should make sure you have a backup.
Reply With Quote
  #6  
Old 11-09-2014, 03:40 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe it works if you run the following query:
UPDATE user SET birthday = '' WHERE birthday = '--'

Backup the table/database first.

Edit: kh99 beat me to it.
Reply With Quote
  #7  
Old 11-09-2014, 03:40 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So from this, it's safe to say it's probable that MyBB null fields for birthdays were "--" and vBulletin uses nothing? I'll make a backup and give it a try, thanks.
Reply With Quote
  #8  
Old 11-09-2014, 03:57 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably because the converter found empty/bad dates and instead of something like 1970-01-01 it removed the numbers which left you with --.
Reply With Quote
  #9  
Old 11-09-2014, 07:41 PM
Outlaw Mantis Outlaw Mantis is offline
 
Join Date: Nov 2013
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works. Ace, thanks guys. One quick question while I'm here. As a result of importing, each user has a "user note" saying "Imported user". Can all members view user notes? It doesn't look so welcoming to have an "Imported user" note on everybody's page. Any suggestions?
Reply With Quote
  #10  
Old 11-09-2014, 07:55 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Normally everyone can't read the notes, but check in the usergroup manager in the "User Note Permissions" section. In my default setup, "User Notes Can Be Posted About This Group" is set to yes but everything else is no.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04173 seconds
  • Memory Usage 2,244KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete