We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Selected Items module

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
18 years ago
Ryan M.'s avatar Ryan M.
All I can think of is that there is a conflict with another extension or something like that.

Sure enough, I have an extension called “Live Search” installed, and disabling that allowed the Selected Items extension to work. I was using 1.0.3 of Live Search, but I see it’s been updated to 1.0.5. I’ll try using that. Otherwise, I could always disable the Live Search extension to set up my Selected Item lists, then re-enable it.

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
18 years ago
Andrew Weaver's avatar Andrew Weaver

When I get a moment I’ll download Live Search and see if I can make my module play nicely with it.

Thanks for looking into this.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
18 years ago
Ryan M.'s avatar Ryan M.

I think the problem might be that both extensions use a similar function name in or for the Javascript. Thanks for loking into it though…I think your extension will be very useful to me.

       
jtnt's avatar
jtnt
137 posts
18 years ago
jtnt's avatar jtnt

I was just coming here to post that it seemed that this module and Huot’s LiveSearch didn’t play nicely together. So, I guess count this as just a confirmation post.

       
Jesse M's avatar
Jesse M
92 posts
18 years ago
Jesse M's avatar Jesse M

Hey Andrew, this is a great piece of software. Comes pretty close to doing what I need. In my case, the client needs to be able to set a specific order for entries listed on category pages, so I’m using a “selection” for each category. It works pretty well, but it’s not quite as user friendly as if it were designed specifically for that purpose.

Your software is more generalized and flexible than what my application calls for, so it actually results in some extra administrative overhead for the end user. For example, if they create a new category, they also have to create a new selection. For my specific application, the list of selections is also not the most user friendly because it is just a long jumbled list of categories. It would be really nice if they were displayed in the same hierarchical fashion as the category administration interface.

This isn’t criticism – the software is great, and because it’s more generalized than my requirement it allows me to do what I need. I’m just mentioning this as an FYI. I wonder if many other users would need the same thing? Perhaps it would be worthwhile to incorporate specialized category oriented functionality into it to eliminate the administrative overhead and improve the user interface for that application.

I did encounter a couple of issues.

  • The JavaScript file doesn’t load because I’m Masking Access to the Control Panel. That results in a control panel URL like http://www.example.com/admin.php. The Selected Items control panel page uses the document relative URL “modules/selecteditems/selecteditems.js” to link to the script, which ends up pointing to http://www.example.com/modules/selecteditems/selecteditems.js instead of http://www.example.com/system/modules/selecteditems/selecteditems.js (where “system” could be another name chosen when installing EE).

For the time being I setup a symbolic link to work around the problem without hacking your code, but it would be great if that could be handled in the module code.

  • It seems that only Super Admins can administer Selected Items in the control panel. I’m able to get into the Update Selection interface with other member groups configured with the appropriate privileges, but the Weblog dropdown isn’t populated.

It appears to me that the issue hinges on line 315 of mcp.selecteditems.php, where a non-Super Admin user’s weblog selection is determined by the value of $allowed_blogs, which I don’t see being set anywhere.

Like I said, this is nice, thanks for making it!

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
18 years ago
Andrew Weaver's avatar Andrew Weaver

Ok - I’ve finally had a chance to update this.

I think this will fix the problems with the Livesearch extension and also allows improves the interface subtly, eg:

i) the previous search is now saved for next time ii) pressing Enter in the search box updates the list of entries rather than submitting the form iii) submitting the form keeps you on the same page, rather than taking you back to the module’s front page (making it more usuable when set up as a Control Panel tab)

[Jesse: I’ve just seen your comments above - I’ll take a look into them for next time. Thanks]

The upgrade should be clean - the module tries to make the necessary database updates when it is run

[Attachment removed - see below for newer version]

       
Jesse M's avatar
Jesse M
92 posts
18 years ago
Jesse M's avatar Jesse M
[Jesse: I’ve just seen your comments above - I’ll take a look into them for next time. Thanks]

Thanks Andrew.

How would you feel about making Selected Items clear the caches upon updating something? I’m caching the output of the weblog:entries tag that lists entries in each category, and currently users have to take another step (to clear the cache) after making an update in Selected Items to make their changes visible.

       
Adam George's avatar
Adam George
283 posts
about 18 years ago
Adam George's avatar Adam George

This module does not (seem to) work in EE 1.6.

I installed per instructions, but when I click ‘create new selection’, i get this above the page:

Notice: Undefined variable: selecteditems_form in /mnt/Target01/331440/331442/www.tear.org.au/web/content/systrunk/modules/selecteditems/mcp.selecteditems.php on line 377

Notice: Undefined variable: selecteditems_form in /mnt/Target01/331440/331442/www.tear.org.au/web/content/systrunk/modules/selecteditems/mcp.selecteditems.php on line 406

When I click on ‘get entries’ nothing happens, when i try to search for entries and hit enter i get an EE CP ‘general error’.

Using Version 1.6.0, build 20070724

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
about 18 years ago
Andrew Weaver's avatar Andrew Weaver

Hi Adam,

Thanks for spotting that. The module worked if you upgraded, but not for a clean install.

Should be fixed now.

I’ve also added the ability to use the {selecteditems_count} variable as a conditional variable, so you can use {if selecteditems_count < 5} to show the first 5 results, for example.

Edit: Please see the Selected Items page to download current version

       
Adam George's avatar
Adam George
283 posts
about 18 years ago
Adam George's avatar Adam George

Hmm, thanks for that Andrew, however, I just downloaded the fresh copy, de-installed and removed the old one completely, then uploaded and installed with the new version, but I still get the same error, and the ‘get entries’ button still does nothing.

There is a javascript error, which I’ve copied here:

Error: uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: http://ww2.tear.org.au/systrunk/modules/selecteditems/ajax.js :: bnb_ajax :: line 74"  data: no]
       
martymix's avatar
martymix
10 posts
17 years ago
martymix's avatar martymix

I’m going to second Adam’s issue – new fresh install with the same line 377 / 406 undefined variables. I do not get the javascript error with the “get entries” though – that works.

       
Jesse M's avatar
Jesse M
92 posts
17 years ago
Jesse M's avatar Jesse M

I’m using Selected Items v. 1.0 with EE v. 1.5.2 and it seems to be impossible to remove all entries from a selection. When all entries are removed, the form field ‘selecteditems_list’ is set to null / empty string. Then SelectedItems_CP::update_selecteditems() throws an error when that value is an empty string.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Holy cow I really could use this on the site I’m working on right now - but I’m running into the same issues as everyone else with errors on lines 377 and 406. I also cannot see any entries at all in the box - so the whole thing is borked for me.

The other similar entry-ordering module (REEOrder) won’t quite do what I need - but Selected Items would work perfectly.

The site I’m working on now is on 1.6.1, build 20071114. I DO have Mark Huot’s Live Search installed - and I just uninstalled it temporarily to see if I could get this to work (see further up this thread about that), but no dice.

Andrew, friend, do you have a spare hour or so to take a look? I have some Paypal with your name on it. :cheese:

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
17 years ago
Andrew Weaver's avatar Andrew Weaver

Hi Ryan, I’ll take a quick look tonight (UK-time) and see if I can reproduce/fix the problems.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Thanks a ton, Andrew. I was going to try and delve into it myself (seems like I need this every third build or so…) - but as you built the thing, if you have any spare seconds, it might be worth everyone’s while for you to take a look first.

       
1 2 3 4 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.