Menu

#538 E_USER_WARNING in functions_ical.inc at line 268

Major
open
nobody
LDAP (6)
1
2023-03-06
2023-02-24
Anonymous
No

Please,
Error when importing a file to the calendar in .ics format:

report-Salas de aula - predioII-2023-1s.ics

E_USER_WARNING in /var/www/html/calendario/functions_ical.inc at line 268
Cannot yet get username when using LDAP
MRBS GET: Array
(
)
MRBS POST: Array
(
[csrf_token] => a351865febdcb59d57f4ee57ff20adab47945176a5c5cc72a894d075b828ac79
[source_type] => file
[import_default_room] => 1
[area_room_order] => area_room
[area_room_delimiter] => /
[import_default_type] => D
[import_past] => 0
[skip] => 0
[import] => Import
)
MRBS SESSION: Array
(
[last_page] => /calendario/import.php?view=week&page_date=2023-02-24&area=1&room=1
[this_page] => /calendario/import.php
[csrf_token] => a351865febdcb59d57f4ee57ff20adab47945176a5c5cc72a894d075b828ac79
[user] => MRBS\User Object
(
[username] => fernando
[display_name] => fernando
[email] => fernando
[level] => 2
[data:protected] => Array
(
)

    )

)

Discussion

  • FERNANDO J DA SILVA

    Sorry, I opened the ticket without logging in

     
  • Campbell Morrison

    Yes, at the moment MRBS cannot get an LDAP user by email address, though it should be possible to do so. In the meantime would it be better if MRBS just used the email address as the username when importing events?

     
    • FERNANDO J DA SILVA

      Yes, if that is possible, at least to finish importing events, that would be good!
      How to proceed with this correction?

       
  • FERNANDO J DA SILVA

    Yes, if that is possible, at least to finish importing events, that would be good!
    How to proceed with this correction?

     
    • Campbell Morrison

      Change lines 268 and 269 of functions_ical.inc from

          trigger_error("Cannot yet get username when using LDAP", E_USER_WARNING);
          return null;
      

      to

          //trigger_error("Cannot yet get username when using LDAP", E_USER_WARNING);
          return $email;
      
       
      • FERNANDO J DA SILVA

        @cimorrison now:

        Uncaught exception 'TypeError' in /var/www/html/calendario/import.php at line 716
        MRBS\get_details(): Return value must be of type array, bool returned
        ####0 /var/www/html/calendario/import.php(1047): MRBS\get_details()
        

        @cimorrison, Were there any changes from version 10 regarding the import file? I'm doing as in the previous version that worked!

         

        Last edit: Campbell Morrison 2023-02-28
        • Campbell Morrison

          Yes, there are changes between 1.10.0 and 1.11.0. Where are you trying to import from? A URL? A .ics file? A .zip file? Or something else? If the data is not confidential could you send me the file by private message?

           
          • FERNANDO J DA SILVA

            I'm trying to import a .ics file
            I am sending .ics file

             
            • Campbell Morrison

              This file should work if you give it a .ics extension.

               
          • FERNANDO J DA SILVA

            @cimorrison, I'm looking for some link in the documentation with information about some change or example of the .ics file, but I couldn't find it, with the changes from version 1.10.0 to 1.11.0.
            If this is the reason for the error now !

             
            • Campbell Morrison

              How did you produce that .ics file? Why I ask is because the format is not valid. See https://icalendar.org/validator.html .

               
              • FERNANDO J DA SILVA

                I have a template ready from last semester and I only changed the data this year

                 
                • Campbell Morrison

                  I'm not sure how it managed to work. It has multiple VCALENDARs, amongst other issues. Could you post the file that worked last semester?

                   
  • Campbell Morrison

    Which version of MRBS are you using?

     
    • FERNANDO J DA SILVA

      onfiguration details
      MRBS version MRBS 1.11.0
      Database schema version 82
      Database local schema version 1
      $auth['type'] ldap
      $auth['session'] php
      Server details
      Base de Dados MariaDB Server 10.6.11-MariaDB
      Sistema operativo Linux webserver 4.18.0-425.3.1.el8.x86_64 #1 SMP Wed Nov 9 20:13:27 UTC 2022 x86_64
      Data/Horas no servidor ter 28 fev 2023 07:31:12 -03
      Server software Apache
      PHP 8.1.14

       
  • FERNANDO J DA SILVA

    @cimorrison, The error also appears in the list of pending reservations:
    E_WARNING in /var/www/html/calendario/lib/MRBS/Auth/AuthLdap.php at line 556
    ldap_search(): Search: Can't contact LDAP server

     
    • Campbell Morrison

      ldap_search(): Search: Can't contact LDAP server

      That's a different problem. It means what it says: MRBS can't contact the LDAP server. You should check your configuration and network connectivity.

       
      • FERNANDO J DA SILVA

        But if I can log in/password and manually register a schedule for the logged in user!
        If there was a connection problem, there would be no login, correct?

         
        • Campbell Morrison

          Yes, that's strange. Can you set $ldap_debug = true; and post your debug log here, having first removed any confidential data?

           
MongoDB Logo MongoDB