Search

A new Extension, “Global Resource Loader” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

The Global Resource Loader is a simple extension that lets you choose events or datasources to be applied to every page, allowing you to choose pages they should not load on.

This is experimental, get it on github

Awesome. Can't wait to try this one out. Didn't even know you were working on it :P

Looks like it's going to make life a hell of a lot easier for big sites.

Thanks so much for this Rowan. We're using it on a couple of large sites. A lifesaver when adding global DS/Events in the final stages of an ever-changing agile build!

I have a couple of suggestions to enhance the extension:

  • Use a system notifier to the UI when saving the page. There's no confirmation at the moment.
  • When editing a Page, if an Event/DS is attached globally, it does not appear in the list. Would it be possible to highlight these in the Page Metadata lists?

A question: if a Page already has a DS attached, and I then attach this again globally, how is the conflict resolved? Is it simply ignored by the global loader?

@Rowan, do you still maintain this extension? I’ve seen some old bugs on Guthub which have not been addressed.

This is experimental

We’ve used this on many big production sites without issue, so I’d support this becoming less experimental and more official :-)

@michael-e, Rowan is probably deep in conjuring up his next extension awesome! You could always fork the branch, make your changes, then send a pull request back. That makes it a lot easier for the extension developer to integrate changes more quickly.

Yes, I am using this (or, let’s say, a slightly changed version…) on production sites as well.

@Nick: I am waiting for Roman’s next extension idea!

You could always fork the branch, make your changes, then send a pull request back. That makes it a lot easier for the extension developer to integrate changes more quickly.

You are right, I should do this!

@Nick: completed! Pull request has been sent.

Rowan — we made a change to our version that stores the configuration as an XML file rather than storing in the manifest/config.php. The reason here is that we ignore the config.php from SVN (because of config differences between dev/staging/production environments) so we can store the Global Resource Loader config safely in SVN and deploy more easily.

Is this something you’d be interested in integrating for the next release?

@nickdunn, definitely! We also have similar troubles with maintaining settings between each development copy and the production copy.

Will make a new release of this after I’ve reviewed your changes.

I’ve added in rwarrender’s additions so that settings are stored in an XML file rather than in the manifest/config.php. Instead they reside in manifest/globalresources.xml.

http://github.com/nickdunn/globalresourceloader/tree/master

@Nick: Since there is no update procedure, you might include a warning in the readme file. If you replace an older version of this extension by your version, you will lose your extension preferences (which will probably break your site).

That’s a good point. Rowan, if I write the logic that converts one-t’other in the update() function will you merge this into the master?

Rowan, you should have received a pull request from me some time ago for this commit which fixes the navigation group.

For the moment I have merged Nick’s changes into my repo to have an up-to-date version:

http://github.com/michael-e/globalresourceloader

Global Resource Loader updated to version 1.0.2 on 8th of January 2010

Does anybody have any idea why this extension breaks in 2.2RC3? Symphony seems to have problems as soon as events or datasources are added to pages using delegates.

Simple example: In a default workspace install, add the “Article” datasource to the homepage using the global resource loader. Since no article will be found, this datasource attempts to throw a FrontendPageNotFoundException, which won’t work as intended. The result is a Symphony Fatal Error:

An error occurred in /var/www/maschine7/symphony/lib/toolkit/class.datasource.php around line 226

221         }
222
223         $this->_param_output_only = ((!is_array($this->dsParamINCLUDEDELEMENTS) || empty($this->dsParamINCLUDEDELEMENTS)) && !isset($this->dsParamGROUP));
224
225         if($this->dsParamREDIRECTONEMPTY == 'yes' && $this->_force_empty_result){
226             throw new FrontendPageNotFoundException;
227         }
228
229     }
230

(It should be noted that the exception is thrown correctly if the datasource is added to the page in Symphony’s backend.)

[EDIT]: I used the current Symphony development code from GitHub. Using the RC3 release the result will be much more verbose, dumping the exception object.

[EDIT2]: Issue #576.

The issue has been solved. If you don’t exclude the datasource from the 404 page, you will create an infinite loop. So what I saw is not a bug but “stupid me”. :-)

Global Resource Loader updated to version 1.0.4 on 1th of March 2011

Changelog

  • German translation (Nils).
  • Fixed bug preventing deselection of items.
  • Possibly other forgotten things.

Hi Rowan, the latest version is listing all my extensions instead of events on the preferences page. This is a bug, isn't it? Here's line 75 of content.preferences.php:

$EventManager = Symphony::ExtensionManager();
$events = $EventManager->listAll();

Shouldn't it be something like the following?

$EventManager = new EventManager(Symphony::engine()->Page);
$events = $EventManager->listAll();

Wow, hell. Time to release again...

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details