Broken Download Link for MarketPress Digital Purchase

So...I'm overhauling one of our sites and everything was working perfectly with Marketpress. I completed purchase of digital product via Paypal, and was returned to order info page.

Clicking the Download link, however results in Page Not Found. Interestingly, I don't even get the 404 page template, just File Nor Found. Firefox console indicates a 503 server response, but there are no such errors in the logs.

I searched, but couldn't find any similar topics. Access has been granted. Store is in main site at agreda.com.

FYI: Site currently has Maintenance Mode plugin activated, but I did test the Download the link with that deactivated and had the same issue.

Any help is greatly appreciated. Thanks!

  • Rupok

    Hi jcnjr

    Hope you had a wonderful day.

    Clicking the Download link, however results in Page Not Found

    I tried to regenerate the issue on my test site but I could not. Files are being downloaded successfully after a successful transaction. But I could see the issue on your site.

    First thing, can you please confirm if your server file permission is ok? You can get details here: https://codex.wordpress.org/Changing_File_Permissions

    If permission is alright, can you please do a plugin conflict test just to make sure no other plugin is causing this? To know more about plugin conflict test, you can check this article: https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Please let us know the result. We will investigate further after we hear back from you.

    Have a nice day. Cheers!

  • jcnjr

    Thank you for the quick reply Rupok

    I should have been more clear: Yes, I tried all standard troubleshooting procedures before stating this topic...I tried default theme, I eliminated possible plugin conflict. I reset permalinks, and I checked all file permissions (755).

    I have also ruled out mod_security causing any problems—there are no errors in logs, and problem persists after turning OFF modsec entirely. I have also repaired the database and optimized all wp_mp_* tables.

    Now...I notice you have logged in, and apparently made some changes. The Marketpress styles are no longer loading. The Default Store Style option is no longer available in the Presentation settings! What happened?

    In further troubleshooting, I have uploaded a new download file for the product. The directory for the download, however, remains the original product/post creation date directory (2012/12 not 2016/04). I presume this is normal, but want to confirm.

    Please advise what we can do to get the styles back, and get the downloads working ASAP.

    Thank You!

  • jcnjr

    OK. Since our site is still hidden, I need to get this all fixed up soon.

    So, I got the styles back by creating a custom Marketpress css theme as directed. This file is just an identical copy of the default.css styles. All marketpress layout, buttons and styles are back, great. But "Default" is still not in the list. That concerns me, and I shouldn't have to use this duplicate stylesheet. Any thoughts?

    PS: This did not fix the download link issue, not that I expected it to do so...

  • jcnjr

    Well, I just removed the maintenance mode and made another test purchase. Now the Download link does not even appear on the order status page.

    These newest issues I describe above started after the recent dev support access to the site...I am hoping Rupok is available to explain what might have happened, or someone else can help us investigate further.

    We have a free download product if anybody cares to see his issue in action:
    https://agreda.com/store/products/income-anywhere-free-sample-chapter/

  • jcnjr

    OK, this has been a nightmare but I'm almost ready to mark this thread Resolved.

    I've got the Download links back, and they appear to be functioning. Anyone care to test? We have a free product available, and I will gladly reimburse any purchase of the "Income Anywhere" download at https://agreda.com/store ("TENCENT" coupon also available for 10¢ purchase price.)

    What did I do? A lot, not exactly sure what fixed things up: reactivated Maketpress and reassigned all store sub-pages (multiple times), restarted Apache and MySQL, pulled out a bunch of hair...

    So, why not mark as resolved yet? The Default option is still not available in the Marketpress Theme dashboard section, even after removing my custom css folder (with just unaltered Default file). Any suggestions regarding this are still appreciated.

    Thank you for putting up with my barrage of updates!

  • Kasia Swiderska

    Hello jcnjr,

    I'm sorry on delay on our end.

    I've got the Download links back, and they appear to be functioning. Anyone care to test? We have a free product available, and I will gladly reimburse any purchase of the "Income Anywhere" download at https://agreda.com/store ("TENCENT" coupon also available for 10¢ purchase price.)

    It looks like its working - I was able to purchase this pdf and it downloaded for me

    So, why not mark as resolved yet? The Default option is still not available in the Marketpress Theme dashboard section, even after removing my custom css folder (with just unaltered Default file). Any suggestions regarding this are still appreciated.

    I tried to replicate this issue on my site and I asked Rupok what was done on your site - but actions there should have not change default styles, becuase he was checking your settings and created new test product to test download link.
    On my test site I was able to replicate this issue only when I changed permissions to this one style file to 200 (and still use FTP access because this is not possible from Dashboard). After that default styles are not loading and they are not showing in presentation settings. Even if I removed this file and then upload it again they were still working - only changing permissions blocked file permanently.
    Can you check permissions on this file and its parent directory?

    kind regards,
    Kasia

  • jcnjr

    Kasia Swiderska Thank you for further testing, and providing the permissions tip.

    All our MarketPress file permissions, however, are 0644 and directories are all set to 0755. Yet, the Default theme style radio button does still not appear, even after removing the default-copy.css I created.

    I asked Rupok what was done on your site - but actions there should have not change default styles

    Sure, should not, but something made the Default css option disappear. And using the unmodified replica, applies the style.

    Thanks again for the help! Any other suggestions for troubleshooting are greatly appreciated.

  • Kasia Swiderska

    Hello jcnjr,

    I have to admit that I run out of the ideas what might cause this. Is it possible for me (or developer if I wont find anything) to take a look on your server? If yes could you please send in the following via our secure contact form https://premium.wpmudev.org/contact/ :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress network admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    kind regards,
    Kasia

  • Rupok

    Hi jcnjr

    Hope you had a wonderful day.

    Thanks for sending message with credentials. Your WP Login credentials are working, but I could not login with FTP credentials successfully. It's stuck at the following point:

    Status:       	Retrieving directory listing...
    Command: 	PWD
    Response: 	257 "/" is your current location
    Command: 	TYPE I
    Response: 	200 TYPE is now 8-bit binary
    Command: 	PASV
    Response: 	227 Entering Passive Mode (66,135,50,51,34,31)
    Command: 	MLSD
    Error:         	Connection timed out after 20 seconds of inactivity
    Error:         	Failed to retrieve directory listing

    Can you please check and confirm?

    Have a nice day. Cheers!

  • Panos

    Hello jcnjr ,

    Hope are having a great day !

    It seems that there is some custom css called from somewhere that hides this area from your settings page.

    Since I can't locate the source from that css as it can be called from anywhere, I have inserted the following snipped in your current theme's functions.php file:

    `
    function wpmu_force_mp_generalsettings_visible() {
    $screen = get_current_screen();

    if( $screen->id == 'store-settings_page_store-settings-presentation' ){
    echo '<style type="text/css">
    #mp-main-form .inside{
    display: block !important;
    }
    </style>';
    }
    }

    add_action('admin_head', 'wpmu_force_mp_generalsettings_visible');
    '

    Cheers!
    Panos

  • jcnjr

    OK, thanks panoskatws ... however:

    1. If you did this on the wpmutest site you created (i assume that was you), that site no longer exists. You must have deleted the site, so I cannot review that for reference.

    2. I do notice the functions hack added to our active theme, but there is still no Default option in the Marketpress Presentation settings. Only My Default-Copy is shown and selected. (See screenshot.) If I remove the matketpress-styles folder, the only option remains None.

    ...there is some custom css called from somewhere that hides this area from your settings page.

    What css class or ID ae you referring to? I do have some custom css styles set in my theme options, but this issue persisted after removing them. If I knew what style you think is hiding the Default radio button, I could review the custom css again.

  • Panos

    Hello jcnjr ,

    When I visited the Store Settings > Presentation page, I noticed that the General settings which contains the Store Style was hidden completely. What was hiding it was this css

    .hidden, .js .closed .inside, .js .hide-if-js, .js .wp-core-ui .hide-if-js, .js.wp-core-ui .hide-if-js, .no-js .hide-if-no-js, .no-js .wp-core-ui .hide-if-no-js, .no-js.wp-core-ui .hide-if-no-js {
        display: none;
    }

    It's unknown to me where it's being called from (a plugin or from the active theme). Adding the snippet I mentioned in previous reply forces it to display. What you can check, is on your main site, remove the Snippet and refresh page and confirm that the General Settings will be hidden.

    1. If you did this on the wpmutest site you created (i assume that was you), that site no longer exists. You must have deleted the site, so I cannot review that for reference.

    I did create a new sub-site (wpmutest) in order to see the behaviour if I enabled the same theme. Unfortunately the theme was not available from Appearance > Themes (probably from Pro Sites module). With your permission I can repeat the test sub-site and try select the same theme as the main site.

    2. I do notice the functions hack added to our active theme, but there is still no Default option in the Marketpress Presentation settings. Only My Default-Copy is shown and selected. (See screenshot.) If I remove the matketpress-styles folder, the only option remains None.

    This happens only to your main site. I have followed all files that interfere with listing the styles list, and compared some testing outputs with sub sites which don't have this issue. So there is no difference in settings (database) of files (since it's the same plugin). I am guessing that it could be some action hook function or some js that removes the Default option. Again this can be located in the active theme or in any of the plugins.

    I know you have already deactivated plugins and selected default theme. It would be really helpful if you could do this once more. Simply leave only Marketpress active (you can bulk deactivate them all and bulk re-activate them) and select another theme. Then check Presentation settings page of the main site and let us know what you see.

    If you want I can do the plugin check but I need your permission first. I assume you have already kept a backup, but in case you haven't I would strongly recommend to take one before going on.

    Cheers!
    Panos

  • jcnjr

    panoskatws said:
    It's unknown to me where it's being called from

    Guess what! The styles you mention are coming directly from WordPress core... wp-admin/css/common.css

    on your main site, remove the Snippet and refresh page and confirm that the General Settings will be hidden.

    There is clearly an error in communication here.

    I indicated that the Default MP Theme Radio Button was missing, after noticing our styles had disappeared in our store. Not that all the General Settings were missing. I even posted this screenshot above.

    Yet now, if I do remove the code you added to our theme functions, then yes, all the General settings disappear! This was never the case. Please revert whatever change was made that requires the Settings to display. To clarify: Only the Default Theme option was missing, not all the general Settings. Now I must have your functions hack to have any optons show at all.

    I can do the plugin check but I need your permission first.

    Thank you for asking. Please do not do anything further, other than revert whatever was done that is now requiring the them functions hack.

    This post above describes the only issue I encountered regarding the missing Default option missing from the MP Presentation Admin. I would like to at least get back to that point, so we can troubleshoot that further.

    Thank you!

  • Panos

    Hello jcnjr ,

    Hope you are having a nice day !

    I would like to clear that when I first visited your admin, in your main site's Presentation settings the first thing I noticed was that the General part was missing and only in your main site. In your sub sites the General Settings part was visible. What I want to say is that it was already hidden by the time I visited your admin.

    This is not default behaviour and after checking through browser inspector I found out that it was hidden by that CSS part ( that I agree that exists in the common.css file, so it might be it, or might be from other plugin replicating this css code or calling it when not needed ).

    I compared that with my installation, but this CSS doesn't exist as you can see in this video:
    https://www.dropbox.com/s/xwqz6qdi78reqco/wpmu-MP-presentation-settings-issue.mp4?dl=0

    With this facts, my first thought was that perhaps some custom or plugin's CSS would be probably adding it. Checking from your browser inspector doesn't mention the exact file so I didn't think of common.css.

    The snipped I added in your functions.php was to include some CSS that will force it to appear (as it overrides the specific css style). And that's the only thing I added.

    I truly hope we have cleared this part, as I am not aware how the General Settings part was hidden in the first place nor that I did any changes that would cause that, I simply noticed that it wasn't there :slight_smile: I can only assume it's coming from a theme or plugin and only way to be sure is by switching theme and deactivate plugins.

    What now?
    Lets see the facts:
    1. The CSS style that shouldn't be there, it doesn't exist in any of my installations nor your sub-sites (at least the ones I checked). It has to be coming from somewhere, so it has to be theme or plugin.

    2. The lost option, as I said I tracked the whole functions path that selects the available themes. That option exists and gets lost in final step. So this can be some filter coming from a plugin/theme or some js that removes it, again probably from theme or plugin.

    As I think of it, it would be necessary to run another plugin deactivation (leaving only Marketpress active) and switch theme in main site and check what happens in main site's Store Settings.

    Please let me know how you think of this!

    Kind regards,
    Panos

  • jcnjr

    when I first visited your admin, in your main site's Presentation settings the first thing I noticed was that the General part was missing

    Well, that is certainly interesting since I never encountered nor reported that behavior As in the screenshot and post I shared above.

    The CSS style that shouldn't be there...It has to be coming from somewhere

    If you are referring to these styles you shared above, they are coming from WordPress Core.

    Unless someone else can provide additional feedback, I will take some time to follow your troubleshooting recommendations, again.

    Our store is currently working with the Default-Copy style folder and I know there is a new MarketPress update in the works and "coming soon". One way or another we'll get this resolved...

  • Panos

    Hi jcnjr ,

    Well, that is certainly interesting since I never encountered nor reported that behavior As in the screenshot and post I shared above.

    I see that the screen shot you are referring to in your last reply was after I had already inserted the snipped in your functions.php file which would force it to appear. That's why it is not hidden in that screen shot.

    I would first recommend to re-install default MarketPress plugin and check the Presentation page, if you haven't already done that of course, and then repeat the plugin/theme check.

    Best wishes,
    Panos

  • jcnjr

    panoskatws

    I had already inserted the snipped in your functions.php file which would force it to appear.

    Thanks again for your help Panos. The functions hack you added to our site, however, is not required to display the General Settings on the Marketpress Presentation page in our dashboard. I never noticed it missing, only the Default style option was/is missing. You apparently assumed the section was not displaying...and added the unnecessary hack to make it appear.

    The reason you did not see the General Settings, is because the setting sections are collapsible! :slight_smile:

    Watch this screencast for a demonstration:
    https://www.dropbox.com/s/5w5bv306ic10wu1/WPMUDevMPAdmin.mp4?dl=0

    The section was clearly collapsed when you viewed it. I have since removed the functions.php hack, and confirmed the General Presentation settings panel does indeed display.

    And yes, I have indeed performed yet another thorough theme and plugin conflict troubleshooting test. There is no conflict. In fact, I captured the screen video above using the default Twenty Sixteen theme, after I removed the functions hack.

    Now... perhaps somebody can help us get back to the task of determining why the Default option radio button does not appear in the Marketpress General Presentation settings.

    Thank you for your support!

    EDIT: Re-encoded video and updated link
    https://www.dropbox.com/s/5w5bv306ic10wu1/WPMUDevMPAdmin.mp4?dl=0

  • Panos

    Hello jcnjr ,

    Sincere apologies for the misunderstanding here, and thank you for pointing this out :slight_smile:

    I noticed that your mp_get_network_setting( 'allowed_themes' ); outputs the follwoing:

    [allowed_themes] => Array
          (
              [classic] => full
              [icons] => full
              [modern] => full
              [default] => psts_level_4
          )    [themes_pro_level] => Array
          (
              [classic] => 1
              [icons] => 1
              [modern] => 1
          )

    among others. It seems that you probably had activated Markepress network wide in the past and then from the Network admin > Settings > Store Network, you had chosen some level at "Theme Permissions" section.

    You can try to
    1. Network Activate Marketpress once again (from Network admin > Settings > Store Network) and scroll to "Theme Permissions"
    2. set the option All can use
    3. If you need you can Network Deactivate it

    Please let me know if this solves your issue :slight_smile:

    Kind regards,
    Panos

  • jcnjr

    Problem solved! Thank you panoskatws

    As recommended, I network activated MarketPress and indeed noticed that use of the Default theme was set to Pro Site level 4 for some reason. I changed that to allow use for all. After network de-activating Marketpress again, the Default theme once again appears in the presentation settings.

    And... when selecting the Default theme, all store pages are displaying properly.

    Gotta love it when the fix is so simple. Thank you for the perseverance to help figure this out. I'll now mark this ticket resolved, and anxiously await the pending update with hopes that it addresses other MP issues we are having.

    Thanks again!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.