• I’ve just installed the photonic plugin and have configured my Flickr user settings.
    Trying to “Add Media” > “Photonic” displays the error “Invalid item ID”. Any suggestions what might be going wrong?
    I am using the “Avada” template v.5.2.2 with fusion builder. Might this be the reason for the conflict/error?

    Thank you for your help!
    Regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry – I have no idea. I have never encountered this error for any theme or plugin in all the years of Photonic. I know of a conflict with Bootstrap-based themes, which can be addressed by following the guidelines here. Try this and see if it helps.

    One other possibility is that you have a plugin that is conflicting with the Add Media functionality. In that case the only way to find the conflicting plugin is to deactivate all plugins and go through activation of them one by one.

    Also, logout, try deleting your cookies and re-login to WP. That might help as well.

    Thread Starter chroli11

    (@chroli11)

    Ok, will do and will keep you posted.
    Thanks for the tips!

    Thread Starter chroli11

    (@chroli11)

    Hello,

    It’s been a while and I just recently got around testing things…

    I’ve tried your suggestion above but to no avail.

    Having installed and uninstalled several other gallery plugins prior to photonic, I’ve made sure all plugins related to any kind of gallery (other than photonic) had been uninstalled. Even though I still received the same message “Cheatin’ huh? Invalid Item ID”.
    I ended up checking my sql database for any tables/data which might interfere and to my astonishment, tables of all prior uninstalled plugins were still there (makes me wonder what the purpose of unistalling really is then…).
    I then deleted all relevant tables, reinstalled and activated photonic again to check it’s functionality. Same result/message as above.

    Then it dawned on me. I could not find any tables in my sql database related to photonic. Shouldn’t there be some “photonic tables”? Is that what “Invalid Item ID” means?
    I am wondering how photonic tables appear within the sql database, meaning what prefix do they have? That way I might be able to conclude that tables are missing…

    Just realised as well the remark “photonic has not yet been tested with WordPress 4.8”. Could that be the reason for this malfunction?

    Thanks for your assistance. I’ve used photonic in the past and would really like to use it again for my current project.

    • This reply was modified 8 years, 7 months ago by chroli11.
    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    Sorry, I didn’t realize you had mentioned “Cheatin’ uh” in the tags of your original post – this is a failure that is triggered by WP directly. I looked into the WP code, and found that the “Invalid item ID” is triggered if there is an “ID” field passed to the media uploader. This is the WP code (from wp-admin/media-upload.php):

    
    // IDs should be integers
    $ID = isset($ID) ? (int) $ID : 0;
    $post_id = isset($post_id)? (int) $post_id : 0;
    
    // Require an ID for the edit screen.
    if ( isset( $action ) && $action == 'edit' && !$ID ) {
    	wp_die(
    		'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
    		'<p>' . __( 'Invalid item ID.' ) . '</p>',
    		403
    	);
    }
    

    Can you tell me what the URL is that the “Photonic” tab is pointing to? When I look at my installations, the URL from WP comes out as https://mydomain.com/wp-admin/post.php?post=1234&action=edit. Note that action is set and is equal to edit, but there is no ID in the URL, hence there is no error for me.

    The only way you would get an error is if some other plugin / theme is inserting an ID parameter in the URL.

    Regarding your other questions:

    1. Photonic doesn’t create its own tables in the database. It simply creates some options in the wp_options database. It doesn’t need to create any other tables,
      as the underlying information in Photonic is not very complex.
    2. The compatibility with 4.8 is just a flag that I have to set on the readme.txt file when I update the plugin the next time. I would have done it long back,
      but I do have a big pending change that I cannot push yet. As you can see on this forum, I am pretty prompt with the plugin support, and I can assure you that there is nothing in 4.8 that breaks the plugin, or I would been all over it.
    Thread Starter chroli11

    (@chroli11)

    Thanks for your reply.

    The url of the photonic tab points to here:
    http://localhost/smypm_wp01/wp-admin/post.php?post=13501&action=edit#

    Looks pretty much like your example above. Only difference I get a hash tag at the end. That’s what you refer to as ID right?

    Thanks for your support!

    • This reply was modified 8 years, 7 months ago by chroli11.
    Plugin Author Sayontan Sinha

    (@sayontan)

    I don’t get the hash at the end. Typically the hash is indicative of a JavaScript failure. Can you keep your JS console open when you click the “Photonic” tab? That might tell you which plugin is causing this failure.

    Thread Starter chroli11

    (@chroli11)

    Ok, this is what I get in the Console while/after I click on the Photonic tab:

    load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-color,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,back&load[]=bone,wp-util,wp-backbone,media-models,plupload,wp-plupload,mediaelement,wp-mediaelement,media-views,jquery-ui-draggable,jquery-u&load[]=i-slider,jquery-touch-punch,iris,wp-color-picker&ver=4.8.1:9

    JQMIGRATE: Migrate is installed, version 1.4.1

    GET load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-color,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,underscore,back&load[]=bone,wp-util,wp-backbone,media-models,plupload,wp-plupload,mediaelement,wp-mediaelement,media-views,jquery-ui-draggable,jquery-u&load[]=i-slider,jquery-touch-punch,iris,wp-color-picker&ver=4.8.1:3 GET http://localhost/smypm_wp01/wp-admin/media-upload.php?chromeless=1&post_id=13508&tab=photonic 403 (Forbidden)

    Plugin Author Sayontan Sinha

    (@sayontan)

    The “Forbidden” indicates that for some reason it is unable to access the URL. I don’t see such an error at my end. I don’t know why you would be seeing such an error – it would point to some sort of a conflict with security privileges. Do you get this problem with the same combination of plugins and themes on another site?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Invalid item ID’ is closed to new replies.