• Resolved Sub7th

    (@sub7th)


    Hi,
    In IE9 there is a limit to the number of CSS links that can be used. Any more than that and IE stops loading any scripts.

    For this reason I’ve migrated some of the plug-in style sheets to a single custom style sheet on my server.

    In the plug-in options I’d like to point the default CSS to a different location and file.

    I realize this isn’t currently an interface option and is hard coded somewhere but I’d like to find the file where I need to edit this code to help eliminate issues with IE9.

    I realize my edits will be changed when I update the plug-in, but any info would be appreciated. I really love this plug-in.

    https://www.ads-software.com/extend/plugins/tablepress/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Sub7th

    (@sub7th)

    Found it.

    I’d like to suggest a feature in a future release that allows users to change the default style sheet location and name for people who have IE9 issues.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post.

    I’m a little bit stunned here. First of all, I didn’t know that IE has such a limit. And I’m even more surprised that a site would reach this, to be honest. This is the first time that I hear this. Are you really using so many plugins that load their own CSS files and are you sure that this is the source of the problem?

    Instead of merging the many CSS files by hand (for which you apparently have changed the code of many plugins already), you should simply use an automatic solution for this. For example, the caching plugin W3 Total Cache can merge all CSS files to one automatically.

    Now, regarding your desired changes for the TablePress Custom CSS file: You are right, editing the path in the plugin files is absolutely not recommended, as it prevents you from performing a clean update.
    Fortunately, in TablePress, there’s totally no need for this! You can simply use existing plugin filter hooks to change the location of the file! That’s also the reason why I will not an option to change this.
    You can simply use the filter hooks “tablepress_default_css_url” and “tablepress_custom_css_url” to change the URLs of the Default and Custom CSS files via a small piece of code in a plugin, and the filter hooks “tablepress_custom_css_minified_file_name” and “tablepress_custom_css_file_name” to change the location on the server where TablePress stores the file.
    I strongly recommend using that solution and not edit the plugin PHP files! But actually, I’d recommend to use a plugin that can combine all the CSS files automatically.

    Regards,
    Tobias

    Thread Starter Sub7th

    (@sub7th)

    Ah that’s a great suggestion!
    Thank you, I will look into W3 Total Cache, as well as using hooks instead.

    Yes, apparently IE has some severe limitations in regards to linking to style sheets and scripts.

    I was surprised as well and went through a lot of troubleshooting.
    At first I thought the issue might be plug-in conflicts but once I tried consolidating the style sheets so that there were fewer script links everything worked fine.

    I think that it’s not just style sheets but all script links because once it hit it’s limit it wouldn’t even load .js links and broke my slider or sometimes my navigation.

    I currently have 14 active plug-ins and IE debug shows 34 links in the debug script (some styles some .js), my theme (Avada) calls 16 for it’s multiple plug-ins and styles. I was told the limit was 30 but it seems to be working fine with 34.

    Again, thanks for the tips!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for that extra info. Really interesting – and another reason to not like IE, I guess…

    W3 Total Cache should indeed be your best option here.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    What is the actual location of the custom css? I could not find this info in the FAQs. I just need to enable write access to it so I dont get the cant update error message. Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question.

    The “Custom CSS” is stored in the database, but then TablePress also tries to save it to files in the “wp-content” folder.

    Can you exlain what “update error message” you are getting?
    And do regular WordPress updates and plugin updates from within the admin dashboard work on your server? Do you have to type in the FTP account information during that process?

    Regards,
    Tobias

    The update error was just a phrase, it happens when you do the migration and it tries to store the custom css but can’t and then prompts you to ftp. There is no indication where the file is stored or what its name is. The custom css was empty but it still tries to save it.

    I keep my web content under version control on my laptop and rsync up to my server, so most directories do not have read access. So it would be useful to have the custom css file details in the FAQ.

    Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, thanks for the explanation!
    Yes, I can see what you are doing, and indeed, the information is useful in that case.
    So, were you now able to save the “Custom CSS” or can I help with anything else to resolve this issue?

    Regards,
    Tobias

    No, Ill probably create in my version control and rsync up, like to minimise what is writable on the server.

    Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I see, that makes sense.
    It might then actually be better to not use the “Custom CSS” in TablePress, but to add the relevant CSS to your theme’s “style.css”, as you probably have that under version control already.

    Regards,
    Tobias

    Actually I already have ??

    but Thanks.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! ?? That’s good to hear!
    Have fun with TablePress then!

    Best wishes,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Changing the location and name of Custom CSS file’ is closed to new replies.