PDA

View Full Version : Mobile Api Can't find class...


acalero
09-10-2013, 05:30 AM
Hi.

We recently updated to VBulletin 5. Previously we were doing calls to api.php with no problem (and with a lot of work done to success) and now we recive the message "Can't find class vB_Api_Login_Login" when trying to log a user and "Can't find class vB_Api_Register_addmember" when trying to register (I suposse we will get the same problem with the user profile update, but at least recovering those two we could figure how to fix it)

the methods (and code) used: login_login and register_addmember as stated at the documentation.

How could we find those two classes and make the methods work again as before?

The classes I can use (after using get_declared_classes) are:

[0] => stdClass
[1] => Exception
[2] => ErrorException
[3] => Closure
[4] => DateTime
[5] => DateTimeZone
[6] => DateInterval
[7] => DatePeriod
[8] => LibXMLError
[9] => SQLite3
[10] => SQLite3Stmt
[11] => SQLite3Result
[12] => DOMException
[13] => DOMStringList
[14] => DOMNameList
[15] => DOMImplementationList
[16] => DOMImplementationSource
[17] => DOMImplementation
[18] => DOMNode
[19] => DOMNameSpaceNode
[20] => DOMDocumentFragment
[21] => DOMDocument
[22] => DOMNodeList
[23] => DOMNamedNodeMap
[24] => DOMCharacterData
[25] => DOMAttr
[26] => DOMElement
[27] => DOMText
[28] => DOMComment
[29] => DOMTypeinfo
[30] => DOMUserDataHandler
[31] => DOMDomError
[32] => DOMErrorHandler
[33] => DOMLocator
[34] => DOMConfiguration
[35] => DOMCdataSection
[36] => DOMDocumentType
[37] => DOMNotation
[38] => DOMEntity
[39] => DOMEntityReference
[40] => DOMProcessingInstruction
[41] => DOMStringExtend
[42] => DOMXPath
[43] => LogicException
[44] => BadFunctionCallException
[45] => BadMethodCallException
[46] => DomainException
[47] => InvalidArgumentException
[48] => LengthException
[49] => OutOfRangeException
[50] => RuntimeException
[51] => OutOfBoundsException
[52] => OverflowException
[53] => RangeException
[54] => UnderflowException
[55] => UnexpectedValueException
[56] => RecursiveIteratorIterator
[57] => IteratorIterator
[58] => FilterIterator
[59] => RecursiveFilterIterator
[60] => CallbackFilterIterator
[61] => RecursiveCallbackFilterIterator
[62] => ParentIterator
[63] => LimitIterator
[64] => CachingIterator
[65] => RecursiveCachingIterator
[66] => NoRewindIterator
[67] => AppendIterator
[68] => InfiniteIterator
[69] => RegexIterator
[70] => RecursiveRegexIterator
[71] => EmptyIterator
[72] => RecursiveTreeIterator
[73] => ArrayObject
[74] => ArrayIterator
[75] => RecursiveArrayIterator
[76] => SplFileInfo
[77] => DirectoryIterator
[78] => FilesystemIterator
[79] => RecursiveDirectoryIterator
[80] => GlobIterator
[81] => SplFileObject
[82] => SplTempFileObject
[83] => SplDoublyLinkedList
[84] => SplQueue
[85] => SplStack
[86] => SplHeap
[87] => SplMinHeap
[88] => SplMaxHeap
[89] => SplPriorityQueue
[90] => SplFixedArray
[91] => SplObjectStorage
[92] => MultipleIterator
[93] => SessionHandler
[94] => mysqli_sql_exception
[95] => mysqli_driver
[96] => mysqli
[97] => mysqli_warning
[98] => mysqli_result
[99] => mysqli_stmt
[100] => __PHP_Incomplete_Class
[101] => php_user_filter
[102] => Directory
[103] => PharException
[104] => Phar
[105] => PharData
[106] => PharFileInfo
[107] => ReflectionException
[108] => Reflection
[109] => ReflectionFunctionAbstract
[110] => ReflectionFunction
[111] => ReflectionParameter
[112] => ReflectionMethod
[113] => ReflectionClass
[114] => ReflectionObject
[115] => ReflectionProperty
[116] => ReflectionExtension
[117] => ReflectionZendExtension
[118] => SimpleXMLElement
[119] => SimpleXMLIterator
[120] => SoapClient
[121] => SoapVar
[122] => SoapServer
[123] => SoapFault
[124] => SoapParam
[125] => SoapHeader
[126] => XMLReader
[127] => XMLWriter
[128] => XSLTProcessor
[129] => ZipArchive
[130] => PDOException
[131] => PDO
[132] => PDOStatement
[133] => PDORow
[134] => vB5_Autoloader
[135] => vB5_ApplicationAbstract
[136] => vB5_Frontend_ApplicationLight
[137] => vB5_Frontend_Application
[138] => vB5_Config
[139] => vB5_Frontend_Routing
[140] => Api_InterfaceAbstract
[141] => Api_Interface_Collapsed
[142] => vB
[143] => vB_Request
[144] => vB_Request_Web
[145] => vB_Request_WebApi
[146] => vB_Cache
[147] => vB_Array
[148] => vB_String
[149] => vB_Cleaner
[150] => vB5_Cookie
[151] => vB5_Template_Options
[152] => vB_Api
[153] => vB_Api_Options
[154] => vB_Input_Cleaner
[155] => vB_Registry
[156] => vB_Template
[157] => vB_Template_Data
[158] => vB_Template_XML
[159] => vB_Template_JSON
[160] => vB_Shutdown
[161] => vB_dB_Assertor
[162] => vB_dB_MYSQL_Assertor
[163] => vB_Database
[164] => vB_Database_MySQL
[165] => vB_Datastore
[166] => vB_dB_Query
[167] => vB_Db_QueryBuilder
[168] => vB_dB_MYSQL_QueryBuilder
[169] => vB_dB_QueryDefs
[170] => vB_dB_MYSQL_QueryDefs
[171] => vB_dB_Query_Select
[172] => vB_dB_Query_Select_MYSQL
[173] => vB_dB_Result
[174] => vB_dB_MYSQL_Result
[175] => vB_Api_Wrapper
[176] => vB_Api_Extensions
[177] => vB_Session
[178] => vB_Session_Web
[179] => vB_Session_WebApi
[180] => vB_Cache_Db
[181] => vB_Language
[182] => vB_Api_Route
[183] => vB_Api_State
[184] => vB_Api_UserGroup
[185] => vB_User
[186] => vB5_Route
[187] => vB_Cache_Memory
[188] => vB_Library
[189] => vB_Library_User
[190] => vB_UserContext
[191] => vB_PermissionContext
[192] => vB5_Facebook
[193] => vB_Api_Facebook
[194] => vB_Facebook
[195] => vB5_Template_Stylevar
[196] => vB5_User
[197] => vB_Api_User
[198] => vB_Api_Style
[199] => vB_Library_Style
[200] => vB5_Frontend_Controller
[201] => vB5_Frontend_Controller_Relay
[202] => vB5_Frontend_ExplainQueries
[203] => vB_Request_Api
[204] => vB_Session_Api
[205] => vB_dB_Query_Insert
[206] => vB_dB_Query_InsertIgnore
[207] => vB_dB_Query_InsertIgnore_MYSQL

For more information, the links of the login method (for example) was taken from:

http://www.vbulletin.com/vbcms/content.php/333-technical-documentation
http://www.vbulletin.com/vbcms/content.php/365-User-Related-Methods
http://www.vbulletin.com/vbcms/content.php/333-technical-documentation

It worked perfectly at 4.2 and it's vBulletin the one that is throwing the exception at file core/vb/api.php, line 74:

if (!class_exists($c))
{
throw new Exception(sprintf("Can't find class %s", htmlspecialchars($c)));
}

It's not a hack, plugin, query or template modification, it's just mobile api not accepting the methods appearing at the documentation. We can interact with the api mobile and init it. The problem is the name of the methods are not accepted anymore.

Is anyone having the same issues or could someone point me in the right direction?

Thank you

magicwalker
11-18-2013, 06:21 AM
another question withot any answer.... I still cannot connect the API

nhawk
11-18-2013, 05:55 PM
In case you haven't discovered this already, the documentation you're using is for vB4.

None of the programming documentation for vB4 applies to vB5 and you'll need to completely re-write your code.

hoangxuanbach
12-05-2013, 06:59 AM
The same issue. Waiting for VB team support.

Lynne
12-05-2013, 05:01 PM
There is no documentation on the vb5 API. You can find the files in /core/vb/api , but there has been no documentation provided to us that we can point you to.