Forum Replies Created

Viewing 15 replies - 1 through 15 (of 49 total)
  • Thread Starter sweden1

    (@sweden1)

    I have just had time to experment a little. But maybe the translation function disappears on the front page of theme 2023 only if I am logged in and there are private posts on the front page. So it is probably not a problem at all for me. The visitors are never logged in so they always have a working translation. What seems to happen if there are private posts on the front page is that when you press the translation tab, the panel of flags does not appear, a faint down arrow just appears above the tab.

    I will try to check further later and come back if neccessary. Thanks for maintaining the plugin.

    Thread Starter sweden1

    (@sweden1)

    Hey there @sweden1 – Twenty Twenty-Three is what’s called a “block theme.” Block themes use a newer system called Site Editing …

    @zoonini

    Hi Kathryn,
    That was a good explanation. Those are many useful comments and links. Thank you. I have just been entering info into a blog for 5 years and added php/js into child themes and plugins where needed. (One part is about including other files into posts using include statements in php.) But now I see the new way of site editing and possibly a Block Theme plugin. I will definitely go through your links and come back if needed. Topic solved.

    • This reply was modified 2 years, 1 month ago by sweden1.
    Thread Starter sweden1

    (@sweden1)

    I mentioned another problem briefly: The translator tab will not activate the panel of flags at all on the front page of the blog in browser Edge. (I have some modifications when the sheet of flags will load also on the page, in the child theme, but this problem also appears in the parent theme twentytwentythree, so I don’t think that is the cause.) Should I start another thread for that?

    I appreciate your maintenance of the plugin.

    News media and globalization – Sverige – En demokrati? (snowleopard.info)

    Thread Starter sweden1

    (@sweden1)

    Hi and good morning from Sweden,

    The translation back to original language works fine now, thank you for settling the problem so quickly.

    I have the same problem after the latest update. My site is written in English and Swedish. Swedish is indicated as the main language of the site. Before I just pressed Swedish and got back the original text. There was also a panel at the top “revert to original”.

    Now I can not return to Swedish/the original mixture of English/Swedish! The Swedish flag (main language of the site) doesn’t work!

    If I press any flag I can just switch between other languages than the original Swedish. I can not return to the original text on any page of the installation. The English shown will not be the English I wrote but some “translated” English.

    Is there any way to rollback to the last version?

    Thank you

    Thread Starter sweden1

    (@sweden1)

    in which context you perform this update. Is this an API access, a cronjob or some hook triggered by a user?

    @threadi

    I can just say your advice was very good. The problem probably originated in using a plugin that was fine for its purpose of introducing php snippets, but not for developing programs. I made a plugin of the code instead and several problems disappeared.

    I don’t really know which is the best way to write a program that will be run occasionally to scan the database. I prefer to run on the server since I sometimes must change programs just from a phone. I also get automatic backup of the installation. Now I just activated the plugin from a shortcode so I didn’t have to go through constructing a menu and admin page for the plugin. No other users have writing access to the installation.

    After changing the program to a plugin, I couldn’t reproduce any errors of strings that could not be written to posts.

    Thread Starter sweden1

    (@sweden1)

    @threadi

    I just run php code from a WP page using a plugin that makes that possible. I am only making changes that will happen once to update some references in the text of some posts.

    I am very satisfied with your help so far. I must be more specific and analyze the input better before coming back with this question. So I put solved on this question since I now know how to proceed. I also got good information that there doesn’t seeem to be any general limitation with wp_update_post(). This is the way to go (get_post() and wp_update_post() ). So I will continue on this in due course with a new question that will be more specific.

    Thank you for your advice for the time being.

    Thread Starter sweden1

    (@sweden1)

    @threadi, thank you for your interest

    The texts are under work and can not be put here, unfortunately. Here is a different situation for another person, but with some similarity

     the query works when I replace the first two lines with hard-coded values,

    https://stackoverflow.com/questions/26924553/cant-get-variables-to-work-in-wpdb-update-query

    So right now I can not go into analysis of the input. I had string variables (blog posts) read by get_post() (and probably modified by preg_replace()) that would not store with wp_update_post(). Nothing happened. (But I could write them as text or html files.) But if I replaced them with string constants, they stored. I hope I can come back to this when I have the time to analyze the input. So there is no way to simply “sanitize” a string so it will always store with wp_update_post() (at least that was my inpression of the problem)?

    So my question can only be more limited right now. Has anyone else experienced this and solved it? It is a simple problem: Read a post, change it and update it. Is there any other approach than the ones I mentioned, that so far failed for me?

    Right now I have decided to try replace/update in SQL. As I understand only mySQL 8 has regex and GoDaddy doesn’t support it on shared hosting, so I will be without regex, capture groups etc. I must have good backup since I can not rollback changes. I first loop through the posts using php and preg_match_all() to get an impression of what the substitutions using mySQL will do.

    Thank you for your interest. Sorry I can not go into the detail of the blog posts that wouldn’t store.

    • This reply was modified 2 years, 1 month ago by sweden1.
    • This reply was modified 2 years, 1 month ago by sweden1.
    Thread Starter sweden1

    (@sweden1)

    Thanks for a really good reply, I will try it out and come back in due course.

    Thread Starter sweden1

    (@sweden1)

    Hi,

    I got into some other issues reverting to backups. But most of them are solved now. It seems I can now update the plug-in. (In the process I also updated the PHP.) I may try to update the plug-in later. I will contact you over the plug-in website if needed.

    Thanks

    Thread Starter sweden1

    (@sweden1)

    We can downgrade the urgency of this. When I removed various calls to these functions, it was possible to deactivate the plug in. (One call from a widget also crashed the widget administration panel and to edit the widget it was necessary to revert to backups where the post-types-plugin was active)

    previous_post_type_link( '%link', __( '%title', 'twentysixteen' ), $args );
    next_post_type_link( '%link', __( ' %title', 'twentysixteen' ), $args );

    Site is up now and the plug in is temporarily deactivated.

    Thread Starter sweden1

    (@sweden1)

    I aplogize for this thread. It can be removed. A widget crash caused the malfunction which was not related to the the Google Translator Plugin. Now the plug-in works fine.

    Thread Starter sweden1

    (@sweden1)

    Thanks. Really appreciate developers that maintain software and forums.

    Thread Starter sweden1

    (@sweden1)

    In the phone the same list of media categories appears under the image, when I edit media.

    The list is long and I cut it in two. Below the list is the tree of categories that works fine. I don’t think the extra list has any effect on the database.

    View post on imgur.com

    So the problem is purely cosmetical. I just wanted to inform the developer.

    Thread Starter sweden1

    (@sweden1)

    I seem to get an extra list of media categories when I edit media. I get the normal tree like structure on top right. But I also get this single level list of categories at the bottom.

    View post on imgur.com

    Thank you for attending to this issue.

    I work slowly. I haven’t used Windows for a long time.

    This was from desktop.

    I will supply a larger screen shot from the phone as soon as possible. But the problem is the same. The list becomes a little intrusive on the phone.

Viewing 15 replies - 1 through 15 (of 49 total)