Reuven

About me: Amateur web developer - Professional volunteer :)

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Reuven replied on the discussion topic Monthly Cron error
    It will take me sometime to upgrade. I have continue with the 2.3. I think I saw a discussion about the same topic with a suggestion how to do it on 2.3 but I cannot find it right now. view reply
  • Reuven replied on the discussion topic Monthly Cron error
    I do not see System Log plugin in my installation. I have Log Browser plugin. I think you're looking in the wrong way. I do not understand. I mean that everyone can visit https://my_site/cron/monthly/ and other... view reply
  • Reuven replied on the discussion topic Monthly Cron error
    History repeats itself :) Thank you Nikolai I deactivated Log Rotate plugin and the error disappeared, instead I received a long report from the GARBAGE COLLECTOR.   Is there a way to disable public access to the cron... view reply
  • Reuven added a new discussion topic Monthly Cron error in the group Plugin Development
    On my new VPS I get the following error while going to https://my_site/cron/monthly/ How to solve? Thank you Fatal Error. An exception occurred while executing 'ALTER TABLE elgg_system_log_1627605221...
    • I do not see System Log plugin in my installation

      Nice.

      I do not understand.

      Ahh. Elgg 2.x.

      Sorry, you haven't such option ¯\_(ツ)_/¯

      It's time to upgrade.

    • It will take me sometime to upgrade. I have continue with the 2.3.

      I think I saw a discussion about the same topic with a suggestion how to do it on 2.3 but I cannot find it right now.

    • If MariaDB is used on your sever you need to adjust two things to get Elgg fully working. Unfortunately, I can only tell you how I had to adjust the configuration on my (local) Linux installation to get it working. The server configuration might be different in your case depending on what tools are available for server administration and where the necessary config files are to be found. If you don't find out yourself how to alter the DB server config, ask the support of your wehboster.

      Firstly, the "archive" database engine needs to be enabled. In case of my server the file is in /etc/my.cnf.d/default_plugins.cnf:

      [server]
      plugin-load-add=archive=ha_archive.so

      The second change I had to do was in /etc/my.cnf:

      [mysqld]
      max_delayed_threads = 0

      I've only posted the relevant lines and the sections these lines would be in the config files. So, there could be other content in these files you wouldn't have to modify.

      The archive engine is necessary for the log table rotation to work, i.e. older log entries are moved into a new table. If you don't need the log entries in the database, you can also use this plugin: https://elgg.org/plugins/1441338. Then the entries won't be created in the first place (on Elgg 3 or newer you could disable the corresponding plugin for the same effect). And you can increase the log rotation interval in the plugin settings.

      The delayed thread settings in my.cnf is necessary for an issue I also had regularly with MariaDB. I don't remember at the moment what action caused it (I had opened an issue in the Elgg repository at github but then realized how to "fix" it by adjusting the DB server configuration). The delayed queries happen only rarely, sothe delayed thread setting shouldn't decrease performance at all.

  • Reuven replied on the discussion topic Error when logging into upgrade.php
    I visited your site and again it is not working well. As iionly suggests - make sure that the data file is accessible. Have you tried to reboot the system? view reply
  • Reuven replied on the discussion topic Error when logging into upgrade.php
    A week ago I also duplicated Elgg on a new vps and had very similar symptoms and more. I visited the site before the upgrade and it looks OK. I also flushed the caches and then run upgrade.php and .... the problems started. I did the... view reply
  • Reuven replied on the discussion topic Duplicate Elgg 2.3 on new server
    Thank you very much Nikolai and iionly. I learn a lot from your answers. However, I reinstalled the site from scratch and the initial tests show that it works well. The problem with the images... view reply
  • Reuven replied on the discussion topic Duplicate Elgg 2.3 on new server
    Thank you iionly. I'm going to check this. view reply
  • Reuven replied on the discussion topic Duplicate Elgg 2.3 on new server
    Thank you iionly. It is not clear to me why two identical installation have different behavior. The old sit is on a shared host the new one on a VPS.  Since I'm quite new to the VPS I suspect that I did not configure it... view reply
  • Reuven replied on the discussion topic Duplicate Elgg 2.3 on new server
    Thank you. I think I duplicated the site correctly. The question is why Elgg creates this kind of icon... view reply
  • Reuven added a new discussion topic Duplicate Elgg 2.3 on new server in the group Elgg Technical Support
    I duplicated my Elgg 2.3 site on a new VPS with the same URL. HopefullyI followed all the instructions here . The only difference between the two installations is the data file address.   Initial tests show that the new...
    • The difference in URL is definitely not a matter related to the configuration of your VPS server.

      It might be that the cache settings of Elgg ("Advanced Settings" in the admin area of your site) differ between the old site and new site and this might cause different URLs (e.g. with caching disabled or some caching options at least) the caching of the files might not be possible in the first place, so you won't get a "cache" URL.

      Apart from the caching options available on the Advanded Settings you might also want to create the symbolic link in the root folder of your Elgg installation. At least for me it never worked to let Elgg create it automatically. Nonetheless, the Advanced Settings page will tell you where the "cache" link would have to point to exactly within the data directory.

    • Thank you iionly.

      I'm going to check this.

    • Thank you very much Nikolai and iionly. I learn a lot from your answers.

      However, I reinstalled the site from scratch and the initial tests show that it works well. The problem with the images disappeared. 

      All the best.

       

  • Reuven replied on the discussion topic Transparent background of images becomes black
    Thank you Nikolai. I'll  check it. view reply
  • Reuven replied on the discussion topic Transparent background of images becomes black
    Thank you Nikolai, I really appreciate your help and patience :) The problem with all the icon_type hooks is that they bring an instance of ElggFile. While I need an instance of Symfony’s UploadedFile (See examples... view reply
  • Reuven replied on the discussion topic Transparent background of images becomes black
    Sorry, but I do not understand. As I said, only the File plugin triggers the hook (upload, file) and it works fine. Other plugins do not trigger it, so I cannot check the $params['xxx']. view reply
  • Reuven replied on the discussion topic Transparent background of images becomes black
    Thank you Nikolai. It works well with File plugin and Embed which depends on File. But not with other plugins, e.g. blog_tools (it has icon upload), avatar images, and my plugins, etc. Only File plugin triggers the hook but not the rest (I... view reply
  • Reuven replied on the discussion topic Transparent background of images becomes black
    Sorry - the text that is not so clear :( view reply
  • Reuven added a new discussion topic Transparent background of images becomes black in the group Plugin Development
      Elgg 2.3.16  In the past I have asked about this issue but have not received any answer. So, I found some workaround that works well for one test plugin (see the code below).  My question is how to make...
    • Thank you Nikolai, I really appreciate your help and patience :)

      The problem with all the icon_type hooks is that they bring an instance of ElggFile. While I need an instance of Symfony’s UploadedFile (See examples below)

      The upload, file hook brings an instance of Symfony’s UploadedFile while I uploaded in File plugin. But it is not triggered by other plugin. Maybe because the File plugin saves the icon through $file->save() while e.g. blog_tools saves the icon through $blog->saveIconFromUploadedFile('icon');

      In the Docs of entity:<icon_type>:prepare, <entity_type> is written:

      The $return value passed to the hook is an instance of ElggFile that points to a temporary copy of the uploaded/linked file.

      If there is a way to get the address of the tmp file from the ElggFile than we have a solution.

      ----------------------------------------------------------------

      An instance of Symfony’s UploadedFile while I uploaded in File plugin:

      Symfony\Component\HttpFoundation\File\UploadedFile Object
      (
          [test:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 
          [originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => transparen-3t.gif
          [mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => image/gif
          [size:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 1564
          [error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
          [pathName:SplFileInfo:private] => /tmp/phpN3v0e5
          [fileName:SplFileInfo:private] => phpN3v0e5
       
      -----------------------------------------------------------------------------------
      An instance of ElggFile while uploading from blog_tools plugin
      ElggFile Object
      (
          [filestore:ElggFile:private] => ElggDiskFilestore Object
              (
                  [dir_root:ElggDiskFilestore:private] => /home/hiranyas/ramElggBook/
              )
       
          [handle:ElggFile:private] => 
          [url_override:protected] => 
          [temp_metadata:protected] => Array
              (
                  [filename] => Array
                      (
                          [0] => tmp/16225762741f87b33136a7542325c55f031d1202dd.png
                      )
       
                  [mimetype] => Array
                      (
                          [0] => image/png
                      )
       
                  [simpletype] => Array
                      (
                          [0] => image
                      )
       
              )
       
          [temp_annotations:protected] => Array
              (
              )
       
          [temp_private_settings:protected] => Array
              (
              )
       
          [volatile:protected] => Array
              (
              )
       
          [orig_attributes:protected] => Array
              (
              )
       
          [attributes:protected] => Array
              (
                  [time_created] => 
                  [guid] => 
                  [type] => object
                  [subtype] => file
                  [owner_guid] => 4021
                  [container_guid] => 36
                  [site_guid] => 
                  [access_id] => 0
                  [time_updated] => 
                  [last_action] => 
                  [enabled] => yes
                  [title] => 
                  [description] => 
              )
       
          [valid:protected] => 
          [time:ElggData:private] => 
      )
    • I don't know nothing about Blog tools but for user's avatars it's work like a charm.

      Just tested with this code snippet:

      elgg_register_plugin_hook_handler('entity:icon:save', 'user', function (\Elgg\Hook $hook) {
           $params = $hook->getParams();
      
           if ($params['entity'] instanceof \ElggUser && $params['file'] instanceof \ElggFile) {
              return true;
           }
      });
       
      As I said you can use 'object' instead of 'user' in the mentioned code to get your entity.
    • Thank you Nikolai.

      I'll  check it.

  • Reuven replied on the discussion topic Groups plugin
    Short or long answers, with or without code, there are many types of answers. Community members are taking the time from their busy schedule and doing the best to give good and helpful  answers. We should be very grateful for every... view reply
  • Reuven replied on the discussion topic Paging of frequently changing data on Elgg 2.3.16
    Thank you iionly, you are right. We display the latest (i.e. sort DESC), log the time of the last one and the next page will start from that time downward. Of course, we miss those records that was changed in between, but we do not... view reply
  • Reuven replied on the discussion topic Paging of frequently changing data on Elgg 2.3.16
    Thank you iionly. I'll check the use of cache. However, in this specific case the underlying data can change many times per second (depending on the number of users). Therefore, the standard approach of paging may not work here. In... view reply