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

Adrienne L. Travis's avatar
Adrienne L. Travis
213 posts
16 years ago
Adrienne L. Travis's avatar Adrienne L. Travis

I can use the older version (1.1), but I am getting an error “ret is null” in mcp.selecteditems.php on the newer version. I can PM or post more data if necessary, but I’ve already reverted to the older version.

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

I’ve recently updated a server to PHP/mySQL 5, and have noticed that we’re getting an error when the user isn’t a Super Admin:

MySQL ERROR: Error Number: 1064 Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) ORDER BY blog_title’ at line 1 Query: SELECT blog_title, weblog_id, cat_group FROM exp_weblogs WHERE weblog_id IN) ORDER BY blog_title

Has anyone come across this? It looks like the loop for the allowed weblogs isn’t returning anything. This was working before, so my thought is that it has something to do with a non-mySQL 5 compatible query.

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

Looking at the code, that bit of SQL would break no matter what version of SQL you used. This will always break if the member has no allowed weblogs.

I’ve copied and pasted that piece of code from somewhere without thinking - are you sure this ever worked?

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

Actually - no, I’m not sure it ever worked. I set up the module for the client last year (and I’m a super-admin), and now that he’s trying to do it himself this year, we’re getting this error. He’s in a user group I made called “Editor”. He does have access to more than one weblog - I logged in as him and was able to post in the weblog her needs to post to, but when trying to organize the entries from that weblog using Selected Items, we get the error.

For now, I just added his group’s number to line 591 (we’re using version 1.2)

if ($SESS->userdata['group_id'] == 1 OR $SESS->userdata['group_id'] == 6)

That bypasses the part of the PHP that’s causing the error.

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

Thanks - I’ll take a look at fixing that dodgy SQL soon.

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

Also ran into this today (in Firebug):

uncaught exception: [Exception… “Not enough arguments [nsIXMLHttpRequest.send]” nsresult: “0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)” location: “JS frame :: http://www.site.com/system/index.php?S=111sessionidthingy222&C=modules&M=selecteditems&P=modify&selecteditems_id=1 :: bnb_ajax :: line 2033” data: no]

This is is Firefox. In safari, the entries to the left load fine, but in FF they do not load, and Firebug shows this exception (See attached pic). I’ll encourage client to use Safari in the meantime.

EDIT: In the rendered souce of the page, line 2033 is:

xml.send();
       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

For the record, I added a ‘null’ in there and everything works fine in FF now.

xml.send(null);
       
Andrew Weaver's avatar
Andrew Weaver
206 posts
16 years ago
Andrew Weaver's avatar Andrew Weaver

Thanks Ryan. I think this is fixed in the current version (but I’ll check…)

       
martymix's avatar
martymix
10 posts
16 years ago
martymix's avatar martymix

Ok here’s an interesting one - I’m using the “exclude” url replacement method. The server I am on (Siteground) requires me to alter the RewriteRule a little - RewriteRule ^(.*)$ /index.php?/$1 [L] where I had to add the ? after index.php to force a query.

I am getting a null response (its grabbing a whole page, not just some xml) from the SelectedItems module when it tries to retrieve the left-hand column xml. If I remove all the rewrite rules, I successfully get the xml. If I remove just the extra ? it still fails with a “no input file specified” error.

All other sites I have used this url replacement method on work correctly - except the difference in this case is the addition of the ?. Ideas? I know this is a weird one.

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

I’ve released a new version of this module which can be downloaded from:

Selected items 1.4

This version should be a bit more robust to different server set-ups.

Note: the module now uses the CP jQuery extension that is included with recent EE installs or can be downloaded from: http://www.ngenworks.com/software/ee/cp_jquery/. This extension must be enabled under Extension Manager in the Admin > Utilities section of the Control Panel.

       
GDmac - expocom's avatar
GDmac - expocom
350 posts
16 years ago
GDmac - expocom's avatar GDmac - expocom

Andrew, thanks for this great module. a small tweek could be sorting the selections-list (on line 88 in the mcp. file i added: .” ORDER BY selecteditems_description”);

edit: i also added a “onclick="return confirm(‘Really delete?’);"”) on line 181, just in case when a enduser is tempted by the delete button 😊

       
festus's avatar
festus
9 posts
16 years ago
festus's avatar festus

I’m using Selected Items 1.4 with a masked Control Panel and I’m running into a problem stated earlier in this thread which is that the “Available Entries” column is blank. It’s clearly not finding the javascript because when I click “Get Entries” with FireFox, Firebug reports that ‘updateSource’ is not defined. When I access the module with the unmasked Control Panel URL, it works fine.

The line in mcp.selecteditems.php which links to the javascript functions is

$DSP->extra_header .= '<scr1pt type="text/javascript" src="modules/selecteditems/js/selecteditems.js"></scr1pt>';

It seems that I am having the same problem which was stated before:

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).

Wasn’t this problem fixed in version 1.3? I don’t know what the earlier code looked like so I don’t know what was changed to resolve this. The URL to my root directory is of the form http://www.foo.edu/mysite/. Any insights into why I am still having the same problem with version 1.4 are appreciated. Thanks.

-john

       
kev_horan's avatar
kev_horan
50 posts
16 years ago
kev_horan's avatar kev_horan

Hi - I’m using selectedItems 1.4 on a site where I’ve also used Levi Graham’s social bookmarks - I installed the social bookmarks extension first, but when I installed selectedItems, its stopped the social bookmarks from working - its now just displaying the tag on the front end - has anyone come across this before?

thanks Kevin

       
rick.prince's avatar
rick.prince
111 posts
16 years ago
rick.prince's avatar rick.prince

Thanks for your great little module - it’s nice and easy to use.

I’d like to be able to display the url_title of the next and previous entry (used for next and previous article). Is there an easy way to do this or will I need to dive into some php?

Cheers!

       
Kevin Evans's avatar
Kevin Evans
222 posts
15 years ago
Kevin Evans's avatar Kevin Evans

hello I am trying to get this to work with latest version but when I hot Get entries on a weblog i want, no entries load. Also where is the documentation? THe link doesnt really link to a doc area for that.

THanks!

       
First 3 4 5 6

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.