• Resolved sfadschm

    (@sfadschm)


    Hi,

    I have some issues displaying the uploaded files on my page. Frontend and backend upload of files works without problems and the files appear in the backend “all files” list.

    However, all Shortcode-Lists, e.g. [shared-files] that I integrate in my Pages show “No files found”.
    When looking at the files list in the backend, I can download them via the shown link, so linking does no seem to be an issue but rather the generation of the file lists seems to fail.

    This happens for all lists produced via shortcodes.

    Is there any option to troubleshoot the generation/loading of the files lists?

    Thanks and best
    Alex

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Anssi Laitila

    (@anssilaitila)

    Hi,

    When editing a file, does it have the setting “Hide from other pages” checked? That would make the file shown only on the page it was uploaded on, and hidden from all other pages.

    There’s also the setting ‘Uncheck “Hide from other pages” for uploaded files’ (plugin settings, File upload -tab), that affects the default behaviour when uploading files.

    Thread Starter sfadschm

    (@sfadschm)

    Thanks for the quick reply!

    The option is unchecked and the files are also not displayed on the same page where they are uploaded (neither in the same [shared_files file_upload=1] short code nor in an additional one).

    Some specifics on the website: It is a network page with two subpages and it is installed in a subfolder on the server (no subfolder in the URL, just a subfolder on the filesystem). As far as I can tell, none of these should affect the plugin, especially as the download from the backend works fine.

    Plugin Author Anssi Laitila

    (@anssilaitila)

    No problem, and thanks for the detailed description.

    Can I ask if you have some kind of permission related functionality in place, maybe some plugin or a custom solution that defines permissions to posts / pages on the site or on the network?

    The shortcodes used by the plugin show the files via a WP_Query, that is connected to the database of the site in question, and if there would be some kind of technical solution on the site that is connected to that query, that might affect so that the files are not shown.

    It’s also possible that the issue is related to the site setup you have, but I’ll have to investigate that further as I don’t have that kind of setup in hand right now.

    But please let me know if you have that kind of solution in use related to setting permissions to posts / pages in general, that would be very helpful in investigating the issue.

    Thread Starter sfadschm

    (@sfadschm)

    There is indeed “Block Visibility” running, however it is not in use on the file pages and disabling it did not change to the issue.

    I took a look at the queries and this is the one in question return an empty result:

    SELECT wp_posts.*
    FROM wp_posts
    LEFT JOIN wp_term_relationships
    ON (wp_posts.ID = wp_term_relationships.object_id)
    LEFT JOIN wp_postmeta
    ON ( wp_posts.ID = wp_postmeta.post_id )
    LEFT JOIN wp_postmeta AS mt1
    ON ( wp_posts.ID = mt1.post_id
    AND mt1.meta_key = ‘_sf_not_public’ )
    WHERE 1=1
    AND (wp_term_relationships.term_taxonomy_id IN (11,25,26,57,64,65))
    AND ( ( wp_postmeta.meta_key = ‘_sf_not_public’
    AND wp_postmeta.meta_value = ” )
    OR mt1.post_id IS NULL )
    AND wp_posts.post_type = ‘shared_file’
    AND ((wp_posts.post_status = ‘publish’))
    GROUP BY wp_posts.ID
    ORDER BY wp_posts.post_date DESC

    In the file edit mode, I see status->published, visibility->public, post-type->File. No real idea what could make this file fall through the query. Not sure about the taxonomy IDs, but it looks like these are basically all.

    Thread Starter sfadschm

    (@sfadschm)

    So the taxonomy filter appears to be a post category filter. I will have to check where this comes from, but would guess that it is likely not a plugin issue but rather a theme one.

    Thanks for the support so far! I will update and close if I can resolve it.

    Plugin Author Anssi Laitila

    (@anssilaitila)

    Hi, thanks for the detailed information. I haven’t encountered any similar issues recently and I’ll mark this closed now.

    Let me know if the issue still persists and I’ll look into it.

    Thread Starter sfadschm

    (@sfadschm)

    Sorry for not following up!

    It was indeed the mentioned category filter which was applied to pages it was not supposed to be applied to.

    So no issue with the plugin, but with my own WP modifications. 🙈

    Thanks again for the support!

    • This reply was modified 3 months, 2 weeks ago by sfadschm.
    Plugin Author Anssi Laitila

    (@anssilaitila)

    No problem, thanks for the info 👍

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

You must be logged in to reply to this topic.