Site-wide theme update issues.

Anyone come across a similar issue as the one below and have a fix?

When I attempt to activate and update a series of themes in the Siteadmin–>Themes section a download dialog comes up asking me to download wpmu-edit.php. Everything else works in my wordpress installation except this. Is anyone else getting this problem? Any ideas for thinking through this one?

(This may have been better served under Theme Support)

Thanks,

Jim

  • mblackmo
    • Flash Drive

    Actually,

    I looked into the server end, and that wasn’t the issue (or at least I don’t think it was). I don’t pretend to play a server admin on TV.

    I did find a solution to this one on the WPMu forums (thank you Andrew) here. Seems like the wp_meta table (specifcally the allowedthemes row) was emptied somehow. I’m not sure how this happened, but when I deleted the row it was instantly repopulated on the next update of sitewide themes and everything is now showing up and working fine. Very strange. I’m not sure of the root of this problem, but I’m glad I found a quick fix.

    Jim

  • simonben
    • Flash Drive

    Are you actually saying that I can update more than one theme at a time in order to put the ads code on all themes at once???

    I have been manually adding “<?php wp_ozh_wsa(“all”:wink:;?>” to all my themes one at a time, and I have only done about 10/200!

  • simonben
    • Flash Drive

    From the Download link above: “You’ll find about 50 different ad codes splashed around the themes with each one indicative of the size of ad that should be used and, for the more popular themes, specific to them.”

    So essentially, I have to go through 100 themes and around 400 php files to discover what the context names are!!!

    Does anyone have a damn list, lol?

    Thanks.

  • Luke
    • The Crimson Coder

    Hmmm…

    I don’t use this myself, but I’m wondering since there are basic aspects of a google ad which would be the same across ads (pub id, etc), if it wouldn’t be acceptable to set some defined constants with those values, and just use those. Then, someone could modify one location, and have it up and running.

  • simonben
    • Flash Drive

    I keep getting this error message, but the plugin appears to work OK regardless. However, the speed of the WSA admin panel is painfully slow…

    Warning: Invalid argument supplied for foreach() in /home/blogsay/public_html/wp-content/mu-plugins/wp_ozh_whoseesads_admin.php on line 1280

    Context 160×600-daisy-rae-sidebar updated

  • simonben
    • Flash Drive

    Image only ads won’t show!!!

    These themes are a nightmare. Some of the ad placements are pretty poor too (sorry). There are enormous ads above the post content – which would annoy the hell out of anyone!

    I appreciate the work and effort that has gone into these themes, but the next release (if there is one) should make the ad placement a little more discreet.

    If you are going to put ads above the content, it should be a small box or banner, not an A4 sheet sized ad, lol.

    Just humble my opinion, keep up the good work.

    : )

  • andrea_r
    • The Incredible Code Injector

    If there are huge ads, then it’s the ad code you placed in there. :slight_smile: Go get the smaller ad code.

    And that ad-above-the-entry is actually the most optimum ad placement according to google.

    I prefer a sidebar ad or two, which I why I don’t use that particular theme pack, or would remove the tags I don’t want. (as per the other thread with all the codes)

  • simonben
    • Flash Drive

    This is driving me nuts…

    Warning: Invalid argument supplied for foreach() in /home/blogsay/public_html/wp-content/mu-plugins/wp_ozh_whoseesads_admin.php on line 1280

    Context 72890nocolor updated

    Although it says it updated – it doesn’t. It saves as blank! I see nowt wrong with line 1280 either.

  • Gautier_Girard
    • Flash Drive

    Hello,

    I’m new to WPMU Premium. I’m not sure to well understand your WSA implementation with Farms 100 theme pack.

    – Once WSA for wpmu is installed, we need to go through the 100 themes and grab the WSA code, and then add each code to the WSA plugin interface ?

    Here you say” # Internationalization of every theme (assisted by the team from blogs.sch.gr)”. It made me understand before paying that I only had to translate once and the translation would work for the 100 themes pack. Is it right ? Where do I translate ?

  • Gautier_Girard
    • Flash Drive

    James, I’ve found your list so you can forget question #1. :slight_smile:

    Apart from question 2 above, Simonben mentions issues with text Google ads and colors in themes. What is the best way to have text ads looking good with all themes ?

    Thanks a lot in advance for your support.

  • Gautier_Girard
    • Flash Drive

    Thanks James, glad to see you. :slight_smile:

    Do you have any idea regarding translation of strings within themes ? Do I need to add English sentences to the WP language file using something like POEdit and then translate them into my own language ?

  • Gautier_Girard
    • Flash Drive

    Hey James,

    Thanks for your reply.

    I’ve had a chance to play with it these days. There are two issues at that time. The first is related to WPMUDev plugins, and the second is related to your themes ( :wink: ) .

    # POEdit and your plugins

    There is a small issue with your plugins, which cause POEdit to fail its catalog update from sources.

    You have these lines in most of your plugins (haven’t have tested all of them actually :wink: :

    _e('' . urldecode($_GET) . '')

    POedit doesn’t like the two ”, saying they are empty strings. So I changed them with :

    _e(urldecode($_GET))

    And POEdit is happy with that. I haven’t tested so I don’t know at the moment if the corresponding texts sent through JS and urls will be translated ?

    Could you please do these changes to your plugins in the next versions to make foreign users like me greatly happy ? :slight_smile:

    # Regarding themes now :

    POedit is also angry with some themes because they’ve got errors. I’ll take a look at them, but most of errors are also due to empty strings. There are 23 errors. One of them causes a fatal error in updating from sources according to POedit.

    Please find below the log produced by POedit. By chance, POedit gives the full path to each file causing an error, why, and at which line it is.

    I’ll fix them in my local install and will get back here when POedit won’t fail when updating from sources :

    15:13:05: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesbenevolencecomments.php:22: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:05: gettext("") returns the header entry with

    15:13:05: meta information, not the empty string.

    15:13:05: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesbenevolencecomments.php:22: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:05: gettext("") returns the header entry with

    15:13:05: meta information, not the empty string.

    15:13:05: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesbenevolencecomments.php:22: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:05: gettext("") returns the header entry with

    15:13:05: meta information, not the empty string.

    15:13:05: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesbenevolencecomments.php:22: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:05: gettext("") returns the header entry with

    15:13:05: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdaisyraegeminicomments.php:18: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdaisyraegeminicomments.php:18: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdaisyraegeminicomments.php:18: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdaisyraegeminicomments.php:18: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeepBlue15comments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeepBlue15comments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeepBlue15comments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeepBlue15comments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzcomments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzcomments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzcomments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzcomments.php:17: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:06: gettext("") returns the header entry with

    15:13:06: meta information, not the empty string.

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzsidebar.php:32: invalid multibyte sequence

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdeichnetzsidebar.php:32: invalid multibyte sequence

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdixiebellesidebar.php:38: invalid multibyte sequence

    15:13:06: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesdixiebellesidebar.php:38: invalid multibyte sequence

    15:13:09: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesradmodcomments-popup.php:94: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:09: gettext("") returns the header entry with

    15:13:09: meta information, not the empty string.

    15:13:09: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesradmodcomments-popup.php:96: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:09: gettext("") returns the header entry with

    15:13:09: meta information, not the empty string.

    15:13:09: C:Documents and SettingsGautierMes documentshotesheyheyheywp-contentthemes80507 100 big onesradmodcomments-popup.php:96: warning: Empty msgid. It is reserved by GNU gettext:

    15:13:09: gettext("") returns the header entry with

    15:13:09: meta information, not the empty string.

  • Gautier_Girard
    • Flash Drive

    Poedit doesn’t fail now.

    Regarding the two sidebar.php files, it’s only a ‘°’ character which causes the error.

    Other errors are related to empty strings while displaying comments’ stuff. I hardcoded them and deleted the extra empty strings, and that did the job

    So, right now, I’ve got ~500 new strings to translate, and ~700 strings to check. Yup yup yup. :slight_smile:

  • Gautier_Girard
    • Flash Drive

    Thanks to you guys. :slight_smile: So we’ll speak about regexps and themes now…

    … indeed I need to mention another (fatal) issue related to translation. Translation doesn’t work for themes because of this. For this example I’ll take the theme Benevolence and its index.php file.

    You have some strings like this :

    <?php edit_post_link(__('Edit this','benevolence'), ' | ', ''); ?> (line 13 here)

    If you translate the corresponding sentence and upload the .mo file, the translation won’t work because of the second __ argument, in this case ,’benevolence’.

    With that, WP still displays the English text, not the translation.

    So if you delete this mention like this :

    <?php edit_post_link(__('Edit this'), ' | ', ''); ?>

    WP actually displays the translation. It works.

    Can you please fix these issues in your themes ?

    I also need your help to fix them in the pack I downloaded… I’d like to use grep or Powergrep to search them using regular expressions but I’m stuck…

    I tried this regexp :

    (__(')[a-zA-Z]+(',')[a-zA-Z]+('))

    It would only work if there were no spaces in the patterns (ie __(‘Editthis’,’benevolence’:wink: ). But there are spaces and maybe numbers. And I don’t know how to add these chars in the pattern. My tries don’t work.

    Can you please help me fix this fatal issue within themes ? It would be great if you could also provide me with the replacement pattern.

    Or maybe there is an easier way to solve this ?

    Thanks in advance,

    Your help would be greatly appreciated.

    Gautier.

  • Luke
    • The Crimson Coder

    I’ll say that I don’t know a thing about internationalization up front. Honestly, for my personal use, I take as much out of it as possible.

    However, I will say that the particular format you’ve listed above (‘Edit this’,’benevolence’:wink: would be something that was done by the original theme author.

    The method is referred to as a “Text Domain”, and is a valid parameter/argument for the functions.

    For the themes in the theme pack(s), they’re all freely available wordpress themes. The folks here have just simply put them together, made sure they work with MU, added in a few features to specific premium plugin calls, and released them.

    The beauty of that, is that you could find the site for the actual theme, and typically track/find/resolve most issues with the theme itself. In the case of this theme, benevolence, you may find some tips/tricks/information on their site that may help you out.

  • Gautier_Girard
    • Flash Drive

    Hi

    Thanks for your reply.

    It’s not about theme customization, I don’t need tips and tricks related to themes… it’s about the theme pack and the fact some themes don’t work when they should be translated.

    The problem is not particular to benevolence but a certain number of themes, nor it’s particular to my own install but the themes.

    I need two regexps (or any other solution) that could fix the problem and let them work as described.

  • Luke
    • The Crimson Coder

    Um, no tip or trick. I’m explaining to you that the additional parameter to either _() or _e() is fully acceptable and valid.

    If the particular theme doesn’t work, you can always check the actual site of the theme author, where you may find some additional input and information.

    As for regular expressions, give google a whirl. :wink:

  • Gautier_Girard
    • Flash Drive

    Hello

    These parameters cause the translation not to work.

    I have thought and checked before posting here and came with a possible solution (mass search and replace) and began a regexp to do it. If there is another faster, or easier solution I’d be glad to read it.

    As for now, I did see Google but without result. I’m still stuck. :slight_smile:

  • Gautier_Girard
    • Flash Drive

    The best regexp I’ve made is :

    __('(.+)','([a-zA-Z]+|[0-9]+|[ ]+)')

    You’ll then need to note which identifiers are found (eg ‘benevolence’:wink:.

    Then you can do a plain text seach and replace like this in all folders :

    ','identifier') => ')

  • Luke
    • The Crimson Coder

    That’s the whole problem, though, that you’re not seeing.

    The following is a valid format in the gettext format:

    __("This is my string", "my_text_domain");

    So, using benevolence as an example:

    __('Edit this','benevolence')

    “Edit this” is the string that gets translated, and “benevolence” is the text domain.

    If that wasn’t valid it wouldn’t tell theme/plugin authors to add that on the WP Codex.

    I’m not sure what parameters/methods you’re using to translate, but there is a flaw in it as it’s not picking up on the text domain parameter, which is valid.

    So, what I’ve been trying to convey is that you’re causing yourself a lot of extra work and heartache with the whole regex stuff, as it isn’t needed.

    For reference, here are some relevant codex page links:

    http://codex.wordpress.org/Localizing_WordPress

    http://codex.wordpress.org/User:Nbachiyski/I18n_for_WordPress_Developers

    http://codex.wordpress.org/Writing_a_Plugin

    If need be, search within each of those pages for “text domain”, and you can see that not only is it a valid parameter in the gettext scope, but also highly recommended that theme and plugin authors use it.

    Removal of the text domain parameter can cause issues when the theme/plugin goes to load that text domain and it doesn’t exist.

  • Luke
    • The Crimson Coder

    Um, why not simply reference the documentation and learn how to work with it?

    Lots of plugins and themes follow that method, and the more themes you run into and translate, the more problems you’ll have.

    If you brush up on translating, you’ll save yourself much time, pain, and angst than trying to recode any theme or plugin that uses a text domain.

    I’m sure there are tons of resources out there through google to help you in this.

    Maybe even a quick check of the theme/plugin website, or its author’s website will help.

    If this was something that really broke translation, the wordpress site would be flooded with complaints.

    Point being, if you quickly learn how to properly translate these plugins/themes, then you’ll save a ton of time down the road.

  • Qlof
    • The Crimson Coder

    Did you finish the 100 themes pack translation? If so, is it possible to post up the files so that others (like me) can download and edit them to their own language?

    I would like to run a swedish wpmu site and I noticed that alot of things become translated in the themes, but not everything. I was just about to manually edit them when I saw this thread :slight_smile:.

  • Qlof
    • The Crimson Coder

    Ok, thanks for the info. I’ll probably wait and update the themes then.

    Most of the themes are already translated. I don’t know if it’s because of the “internationalization” or because of my MU language files (which are said to only translate the admin menus). But there are words here and there that aren’t translated so I’ll probably go through all of the themes and edit them one by one. If it’s just a word here and there it shouldn’t be a big problem.