TidyPics not showing images when activating my EXTREMELY simple plugin

Hey guys! 

I have an elgg site running with the Aalborg theme, I made a plugin of my own in order to overwrite some css from said theme. 

My start file: 

elgg_register_event_handler('init', 'system', 'integer_init');
function integer_init() {
    elgg_extend_view('css/elgg', 'hello/css');
}

For some reason this completely stops all the Tidypics from loading on the site, they show up as missing files. The css file being imported is literally only changing background colors / text colors of various elements. Not sure what could be causing this. My plugin is on top, tidy pics on bottom Aalborg somewhere in the middle. 

Can anyone shed some light on the subject? 

Thank you!

 

  • So weirder even, if I comment out the start.php file it is still broken, if I completely empty out the file including the <?php ?> it no longer breaks tidy pics. 

  • First, are you sure that the error is in your start.php and not in your css file? Test with site caching in the advanced site settings disabled to be sure that even with the elgg_extend_view line disabled the error does not only still occur because the cache has not been flushed.

    If the error is in start.php for sure, do you have any empty line at the beginning of the file before <?php ? This would cause the error, so make sure there's no empty line or whitespaces before <?php. You also should not include the ?> at the end of php files. Elgg deals with the ?> closing tag on its own.

    If there's still an issue, check the error log and/or the browser webconsole for errors.

  •  
    what do you use as plugins me i daze the same problem dice i put hypewall with tidypics I did not find the solution if you find there the sign me
  • @iionly 

    I have tested to make sure the cache is flushed. 

    No web console errors, no empty lines. Ill check the error log on the server. 

  • for all to work I left the unmodified version 2.3.8 and I took all the plugin on github with all the dependencies. now I have my wall with hypewall that works properly with my gallery tidypics in which I load my images
    thanks to iionly for his patience and persistence
    my problem may have been that I had modified a file
    Eliminate All in File Activity: F: \ xampp \ htdocs \ elgg \ vendor \ elgg \ elgg \ views \ default \ page \ layouts / content.php

    // generate a list of default tabs
    $ tabs = array (
    / * jmp 'all' => array (
    'text' => elgg_echo ('all'),
    'href' => (isset ($ vars ['all_link']))? $ vars ['all_link']: "$ context / all",
    'selected' => ($ filter_context == 'all'),
    'priority' => 200,
    ), * /

    and I did not remember this change in the sources of elgg

  • First and most important: any customizations you make should be done within a plugin you create. If something goes wrong when adding a modification you can simply disable this plugin and you also don't forget what you have changed. And you have no trouble when upgrading your site and forgot to backup your changes (and you wouldn't have to re-add the modifications). See http://learn.elgg.org/en/stable/guides/views.html#altering-views-via-plugins. You also don't have to make separate plugins for each modifications. You could just put all views you want to override (i.e. "replacing" the original view from Elgg core or another plugin) within one plugin that you place below the plugin(s) you want to override a view or views from. If you only override views you also don't need more than a manifest.xml (where you adjust the name and id at least to be unique) and a start.php with only <?php in the first line. Then you can put all views you want to modifiy into views/default/ within you plugin with the paths to the view corresponding to the path of the view you want to override at it's original location.

    As for the removal of the All tab there's a plugin https://elgg.org/plugins/2595353. Though I'm not sure that it will work (as it's basically the same change as you also made) because some plugins might expect (require) that the All tab is available or there might be dead links (menu entries leading to pages that are blocked because the All tab is unavailable). For example Tidypics would have a sidebar link to "All" albums that would result in an error then (as it had happened on your site) and the site menu entry would also point to this page (if you don't switch it to "All images" instead in the Tidypics settings). So, you might have to consider if you rather want to hide the All tab (and then maybe have to customize a lot of plugins to avoid problems) or if you just keep the All tab. If people set the access level of their content accordingly - e.g. friends - no other members but those who match this access level will see their content anyway. "All" tab does not display all content. And group content can be restricted to group members only (also restricting joining groups is possible). So this further limits the visibility of content without the need to remove the All tab.

  • @iionly 

    I'm extending the CSS via 

     

    <?php
        
    elgg_register_event_handler('init', 'system', 'integer_init');
    
    function integer_init() {
        elgg_extend_view('elgg.css', 'integer/css');
    }
    
    ?>    
    

    When this code is not commented (I can have the <?php but nothing else) every image on the site breaks except profile pictures (i.e. tidy pics and like icons and the nav icons) 

    It also breaks if I have any code in there not just this code i.e. if I comment out the extend view call. 

    This is driving me insane. I can't get a simple plugin to work.

  • On top of this, the plugin does work its just the images breaking. 

  • ...

    I had an ending php tag. 

  • So, it works without the ending php tag?