Filed https://issues.apache.org/jira/browse/OPENMEETINGS-1448 and fixed would appreciate if you can test if it works as expected on your data
On Tue, Aug 16, 2016 at 8:11 AM, Andre Wruszczak <[email protected]> wrote: > Hey Maxim, I found some of the Config files and should be fine with that so > far. > > Currently I use the OmGateway with the config, to get an ssid, from my > default user (which has Login/Room/Soap accesss). > > But now I am stuck with creating a room and entering it (I want to generate a > link that goes to the created room.) > > I think the problem is in this line of code = > > $parameter = [ > 'name' => urlencode($name), > 'type' => 3, > 'comment' => '', > 'numberOfPartizipants' => 50, > 'isPublic' => false, > 'appointment' => false, > 'moderated' => 1, > 'audioOnly' => false, > 'allowUserQuestions' => true, > 'allowRecording' => true, > 'chatHidden' => 1, > 'externalType' => true > ]; > > $conf = $this->getOmConfig(); > $gateway = new OmGateway($conf); > if($gateway->login()){ > $roomId = $gateway->updateRoom($parameter); > return $roomId; > } else { > return false; > } > And maybe I am generating the link for the moderator wrong as well... > > > $conf = $this->getOmConfig(); > $gateway = new OmGateway($conf); > > if($gateway->login()){ > $hash = getOmHash($gateway, array("roomId" => $roomId, "moderator" => > 1, "allowrecording" => 1)); > $url = $gateway->getUrl() . "/swf?secureHash=" . $hash . > "&scopeRoomId=" . $roomId . "&language=2"; > > return $url; > } else { > return false; > } > > Help would be great - I think I am pretty much stuck right now. > > With lots of regards > Andre > > -----Ursprüngliche Nachricht----- > Von: Andre Wruszczak [mailto:[email protected]] > Gesendet: Monday, August 15, 2016 11:26 PM > An: [email protected] > Betreff: AW: AW: Not able to install with backup (3.02 to 3.12) "Enum missing" > > Hey Maxim, so currently I am stuck with : > > function getOmConfig() { > global $CFG; > return array( > "protocol" => $CFG->openmeetings_protocol, > "host" => $CFG->openmeetings_host, > "port" => $CFG->openmeetings_port, > "context" => $CFG->openmeetings_context, > "user" => $CFG->openmeetings_user, > "pass" => $CFG->openmeetings_pass, > "module" => $CFG->openmeetings_moduleKey > ); > } > > What is what. I have no access to $CFG, so I have no idea what values to use > here. > > And I assume the "User" and "Pass" is the global Openmeetings Soap User you > were talking about? > > Cheers > Andre > > -----Ursprüngliche Nachricht----- > Von: Maxim Solodovnik [mailto:[email protected]] > Gesendet: Monday, August 15, 2016 6:12 PM > An: Openmeetings user-list <[email protected]> > Betreff: Re: AW: Not able to install with backup (3.02 to 3.12) "Enum missing" > > Here is how you can display room [1] > You can find the code for getSecureHash and getUser here [2] and here [3] > > $USER in Moodle contains details of currently logged in user > > [1] > https://github.com/openmeetings/openmeetings-moodle-plugin/blob/master/renderer.php#L123 > [2] > https://github.com/openmeetings/openmeetings-moodle-plugin/blob/master/lib.php#L71 > [3] > https://github.com/openmeetings/openmeetings-moodle-plugin/blob/master/api/OmGateway.php#L91 > > On Mon, Aug 15, 2016 at 8:35 PM, Andre Wruszczak <[email protected]> wrote: >> Haha I know that feeling. >> >> >> >> So there is only ONE om-soap user, in the om-system. And everyone in >> the CMS logs into that single om-soap user and saves that sid. >> >> Then with that sid I can create a room, how do I generate a hash for >> the currently logged in user though? >> >> >> >> Code samples would be HIGHLY appreciated! >> >> Cheers >> >> Andre >> >> >> >> >> >> Von: Maxim Solodovnik [mailto:[email protected]] >> Gesendet: Monday, August 15, 2016 1:01 PM >> An: Openmeetings user-list <[email protected]> >> Betreff: Re: AW: Not able to install with backup (3.02 to 3.12) "Enum >> missing" >> >> >> >> Never have enough time to write documentation :l PRs are welcome :) >> >> First of all we have commercial WordPress plugin :) If you have budget >> you can contact commercial support :) >> >> In case you don't have ..... >> You need to store om-soap user credentials somewhere You need to logon >> to om as soap user and save authenticated sid. >> You need to create room or use public room You need to generate hash >> for currently logged in user (you only need some unique id for that) >> Then open om room using generated hash >> >> I can provide you with code samples later (we have open source moodle >> plugin, you can check it) >> >> WBR, Maxim >> (from mobile, sorry for the typos) >> >> >> >> On Aug 15, 2016 17:49, "Andre Wruszczak" <[email protected]> wrote: >> >> Hey Maxim, >> >> I'm sorry, but I still didn't get 100% how to implement it. >> >> Good job for guessing that I really do have a CMS (Wordpress) and I >> have users logged in there that need to create and join rooms. >> >> Would you mind elaborating your how to steps? >> As I couldn't find anything similar, I will take it on me to create a >> Guide for fellow users on how to do the same thing. >> >> Also the Code of the github repo isn't very well documented, sadly. >> >> So let's say I have the credentials of a user in wordpress. How would >> I go on for the following steps : >> 1. Register a user in OM with the credentials I already have ( >> preferably with the PHP API) 2. Login a user and getting the SessionID >> with the PHP API. >> 3. Create a room and join it with the PHP API. >> >> All the other things I already implemented. >> >> With lots of regards, and would really highly appreciate the help >> >> -Andre >> >> >> >> >> -----Ursprüngliche Nachricht----- >> Von: Maxim Solodovnik [mailto:[email protected]] >> Gesendet: Monday, August 15, 2016 5:24 AM >> An: Openmeetings user-list <[email protected]> >> Betreff: Re: Not able to install with backup (3.02 to 3.12) "Enum missing" >> >> Consider the following sitauation: >> >> you have some external system (for ex. CMS) you need to ensure user >> known to CMS will have an ability to use OM without any additional >> authentication request >> >> your steps >> 1) create some configuration file/page add OM URL, user credentials of >> user with soap priviledges >> 2) create page/function you going to call to enter OM room >> 3) in this function >> a) call /user/login (providing soap user credentials) >> b) call /user/hash (providing current user details inside >> "ExternalUserDTO user" parameter >> 4) use hash generated to enter the room >> >> BTW you can use our PHP API to implement this >> https://github.com/openmeetings/openmeetings-api-plugin >> >> On Mon, Aug 15, 2016 at 10:00 AM, Andre Wruszczak <[email protected]> wrote: >>> I see, thanks for the input! >>> >>> How would I go at adding an user (registering) to the db? >>> >>> Because I apparently need the SID for adding an user. But I can only >>> get an SID via logging in. >>> >>> Thanks for all the help! >>> >>> Cheers >>> Andre >>> >>> -----Ursprüngliche Nachricht----- >>> Von: Maxim Solodovnik [mailto:[email protected]] >>> Gesendet: Monday, August 15, 2016 4:27 AM >>> An: Openmeetings user-list <[email protected]> >>> Betreff: Re: Not able to install with backup (3.02 to 3.12) "Enum missing" >>> >>> Hello Andre, >>> >>> Actually current REST/SOAP API was designed to be used from plugins >>> so the flow would be >>> >>> 1) login as "soap" user >>> 2) call [1] enter the room/watch recording using hash generated >>> >>> [1] >>> http://openmeetings.apache.org/openmeetings-webservice/apidocs/org/ap >>> a >>> che/openmeetings/webservice/UserWebService.html#getRoomHash(java.lang. >>> String,%20org.apache.openmeetings.db.dto.user.ExternalUserDTO,%20org. >>> a >>> pache.openmeetings.db.dto.room.RoomOptionsDTO) >>> >>> On Mon, Aug 15, 2016 at 8:29 AM, Andre Wruszczak <[email protected]> wrote: >>>> Hey Sebastian, >>>> >>>> >>>> >>>> The problem with the UserService in the new webservice is, that it >>>> needs the user to be either an admin or of type user with soap rights. >>>> >>>> In the existing software “externals” and “contatcs” were used, >>>> without any problems. I guess the only solution to this would be >>>> changing the type of every user to “user” in order for them to be >>>> able to log in via SOAP. >>>> >>>> >>>> >>>> Thanks again for the fast reply! >>>> >>>> Cheers >>>> >>>> Andre >>>> >>>> >>>> >>>> Von: [email protected] [mailto:[email protected]] >>>> Gesendet: Monday, August 15, 2016 3:14 AM >>>> >>>> >>>> An: Openmeetings user-list <[email protected]> >>>> Betreff: Re: Not able to install with backup (3.02 to 3.12) "Enum >>>> missing" >>>> >>>> >>>> >>>> Yeah let's see if we can update the API samples. But there is a >>>> login method in the UserService: >>>> http://openmeetings.apache.org/openmeetings-webservice/apidocs/index. >>>> h >>>> tml >>>> >>>> In general the flow has not changed, just notation and documentation >>>> is new. >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Sebastian >>>> >>>> >>>> >>>> 2016-08-15 12:49 GMT+12:00 Andre Wruszczak <[email protected]>: >>>> >>>> Hi Sebastian! >>>> >>>> Yes the problem was fixed once I deleted all the recordings. >>>> >>>> This helped me greatly, thanks! >>>> >>>> I will open the tickets first thing tomorrow. >>>> >>>> >>>> >>>> I have yet another question : >>>> >>>> http://openmeetings.apache.org/RestAPISample.html is very outdated. >>>> >>>> >>>> >>>> How do I login a normal non-admin user via the webservice in 3.1.2? >>>> I couldn’t find any documentation on that. >>>> >>>> >>>> >>>> Cheers >>>> >>>> Andre >>>> >>>> >>>> >>>> Von: [email protected] [mailto:[email protected]] >>>> Gesendet: Monday, August 15, 2016 12:36 AM >>>> An: Openmeetings user-list <[email protected]> >>>> Betreff: Re: Not able to install with backup (3.02 to 3.12) "Enum >>>> missing" >>>> >>>> >>>> >>>> Hi Andre, >>>> >>>> >>>> >>>> this might be both a bug and a bit an unforeseeable recording status. >>>> >>>> >>>> >>>> I think a recording should never be stuck in the state of >>>> "Recording.Status.PROCESSING", I think that would mean the recording >>>> was not correctly finalised. >>>> >>>> >>>> >>>> So, two things to do: >>>> >>>> 1) Please fill a bug, there is a need to fix: >>>> https://svn.apache.org/viewvc/openmeetings/application/tags/3.1.2/op >>>> e >>>> n >>>> meetings-install/src/main/java/org/apache/openmeetings/backup/Backup >>>> I >>>> m >>>> port.java?view=markup >>>> >>>> >>>> >>>> to handle old Recording Status format types. >>>> >>>> Please open a ticket at: >>>> https://issues.apache.org/jira/browse/OPENMEETINGS >>>> >>>> >>>> >>>> You can assign it to me. >>>> >>>> >>>> >>>> 2) Please unzip the backup and look into the file "flvRecordings.xml". >>>> >>>> >>>> >>>> Maybe send me an example or put it somewhere on pastebin.com. >>>> >>>> But it should be as easy as replacing all occurrence of "Processing" >>>> and replace with "CONVERTING" >>>> >>>> >>>> >>>> Then zip it up again (keep in mind that I think you got to zip the >>>> content of the folder, not the root folder) and re-do the import. >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Sebastian >>>> >>>> >>>> >>>> >>>> >>>> 2016-08-15 8:22 GMT+12:00 Andre Wruszczak <[email protected]>: >>>> >>>> Dear openmeetings user group, >>>> >>>> >>>> >>>> The problem persists, no matter how I try importing the backup. >>>> >>>> ./admin.sh -i or -r both do not work. >>>> I always get the same error. >>>> >>>> The Web-Client itself isn’t really an option, my backup is very big >>>> J >>>> >>>> >>>> >>>> >>>> >>>> Cheers >>>> >>>> Andre >>>> >>>> >>>> >>>> Von: Andre Wruszczak [mailto:[email protected]] >>>> Gesendet: Sunday, August 14, 2016 5:33 PM >>>> An: [email protected] >>>> Betreff: Not able to install with backup (3.02 to 3.12) "Enum missing" >>>> >>>> >>>> >>>> Dear openmeetings user group, >>>> >>>> >>>> >>>> Today I tried upgrading my openmeetings version (from 3.02 to 3.12, >>>> made a backup of DB and OM from 3.02 and tried importing like >>>> presented in this guide : >>>> http://openmeetings.apache.org/Upgrade.html) >>>> and stumbled across following error : >>>> >>>> >>>> >>>> [ERROR] [main] org.apache.openmeetings.cli.Admin - Restore failed >>>> >>>> java.lang.IllegalArgumentException: No enum constant >>>> org.apache.openmeetings.db.entity.record.Recording.Status.PROCESSING >>>> >>>> at java.lang.Enum.valueOf(Enum.java:238) >>>> >>>> at >>>> org.simpleframework.xml.transform.EnumTransform.read(EnumTransform.j >>>> a >>>> v >>>> a:58) >>>> >>>> at >>>> org.simpleframework.xml.transform.EnumTransform.read(EnumTransform.j >>>> a >>>> v >>>> a:29) >>>> >>>> at >>>> org.simpleframework.xml.transform.Transformer.read(Transformer.java: >>>> 1 >>>> 0 >>>> 6) >>>> >>>> at >>>> org.simpleframework.xml.core.Support.read(Support.java:372) >>>> >>>> at >>>> org.simpleframework.xml.core.PrimitiveFactory.getInstance(PrimitiveF >>>> a >>>> c >>>> tory.java:105) >>>> >>>> at >>>> org.simpleframework.xml.core.Primitive.readTemplate(Primitive.java:2 >>>> 3 >>>> 1 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Primitive.read(Primitive.java:171) >>>> >>>> at >>>> org.simpleframework.xml.core.Primitive.readElement(Primitive.java:20 >>>> 7 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Primitive.readElement(Primitive.java:18 >>>> 9 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Primitive.read(Primitive.java:124) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.readVariable(Composite.java:6 >>>> 2 >>>> 3 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.readInstance(Composite.java:5 >>>> 7 >>>> 3 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.readUnion(Composite.java:549) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.readElement(Composite.java:53 >>>> 2 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.readElements(Composite.java:4 >>>> 4 >>>> 5 >>>> ) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.access$400(Composite.java:59) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1 >>>> 3 >>>> 8 >>>> 3) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.read(Composite.java:201) >>>> >>>> at >>>> org.simpleframework.xml.core.Composite.read(Composite.java:148) >>>> >>>> at >>>> org.simpleframework.xml.core.Traverser.read(Traverser.java:92) >>>> >>>> at >>>> org.simpleframework.xml.core.Persister.read(Persister.java:625) >>>> >>>> at >>>> org.simpleframework.xml.core.Persister.read(Persister.java:606) >>>> >>>> at >>>> org.simpleframework.xml.core.Persister.read(Persister.java:584) >>>> >>>> at >>>> org.apache.openmeetings.backup.BackupImport.readRecordingList(Backup >>>> I >>>> m >>>> port.java:825) >>>> >>>> at >>>> org.apache.openmeetings.backup.BackupImport.performImport(BackupImpo >>>> r >>>> t >>>> .java:502) >>>> >>>> at >>>> org.apache.openmeetings.cli.Admin.restoreOm(Admin.java:521) >>>> >>>> at org.apache.openmeetings.cli.Admin.process(Admin.java:272) >>>> >>>> at org.apache.openmeetings.cli.Admin.main(Admin.java:528) >>>> >>>> This happened while running : ./admin.sh -i -file >>>> backup_yesterday.zip >>>> >>>> Everything up to this point went smoothly and was installed properly. >>>> But Rooms and Recordings have not been imported yet ( as the >>>> installer >>>> fails) >>>> >>>> >>>> >>>> Would really appreciate some help. Currently I am trying to install >>>> it via the Web-Client instead of the CLI – but I do not think that >>>> this will help at all. >>>> >>>> >>>> >>>> Cheers >>>> >>>> Andre >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Sebastian Wagner >>>> https://twitter.com/#!/dead_lock >>>> [email protected] >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Sebastian Wagner >>>> https://twitter.com/#!/dead_lock >>>> [email protected] >>> >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >> >> >> >> -- >> WBR >> Maxim aka solomax > > > > -- > WBR > Maxim aka solomax > > -- WBR Maxim aka solomax
