Jump to content
thirty bees forum
  • 0

Email translations No subject was found in the database


vzex

Question

19 answers to this question

Recommended Posts

  • 0

Seems there was a problem with the installation process. Can you confirm that there exists a subdirectory /mails/ at all? I'd guess no. If the subdirectory would exist, tb will accept the changes and clone the changed mails directory to /themes//mails/, where it will be searched automatically in case of further changes. Solution: Go to localization --> translations --> section: Add / Update a language and import your language. Then try again to modify the mails.

Link to comment
Share on other sites

  • 0

@Occam said in Email translations No subject was found in the database:

Seems there was a problem with the installation process. Can you confirm that there exists a subdirectory /mails/ at all? I'd guess no.

Mine does exist: mails/en

My installation was a clean install via cpanel

If the subdirectory would exist, tb will accept the changes and clone the changed mails directory to /themes//mails/, where it will be searched automatically in case of further changes. Solution: Go to localization --> translations --> section: Add / Update a language and import your language. Then try again to modify the mails.

Will this solution overwrite all the "powered by prestashop" I've already edited out?

If it will should I just replace the three emails from a new copy of TB? orderchanged orderconfproductlist orderconfcat_rules

Link to comment
Share on other sites

  • 0

Why so complicated? How about this?

  1. Copy the folder /mails/en to your locale computer.
  2. Open all html files at once with notepad++.
  3. Choose Replace from menu, then
  4. Replace with option in all open files the following: {shop_name} powered by PrestaShop™
  5. Click on Save all
  6. Repeat this with the phrase powered by PrestaShop(tm) [http://www.prestashop.com/] for the txt files in this folder.
  7. Upload the folder to /themes//mails
Link to comment
Share on other sites

  • 0

I like your thinking @Occam! We need a tips and tricks thread :)

Was already through them all one by one, have a mac so no notepad++ and thought it could be a bug not sure why it happened.

Link to comment
Share on other sites

  • 0

Back to translations...while editing out powered by PS I tried to change it to thirtybees using the icon image for the link but editor gave me a 500 error for the file source lookup to add image

0_1499191799863_Screen Shot 2017-07-04 at 2.02.51 PM.png

0_1499190814150_Screen Shot 2017-07-04 at 1.52.07 PM.png

Link to comment
Share on other sites

  • 0

Had to do a rollback so now need to restore what I lost.

The only bad part about frustration timeout is you loose the tempo and have to get it back :)

Two days was good, now I just want to steam ahead, until the rain stops and sun comes out at least!

Link to comment
Share on other sites

  • 0

Very sorry. I have a test site for all the screwups I make. It's hard to regain the momentum, but once you do ... the sky's the limit! Can you please (I hope I'm right!) update your reply to Michael with his ID so he knows to come back here? We usually try not to bother him but he asked you for something I don't know how to do, either.

Link to comment
Share on other sites

  • 0

It's actually good practice, frustrating but good :) I've been using tbupdater as my backup method since it's quick to do and offers rollback. PS didn't have that option unless there was an actual update so I hope TB stays this way!

Same with the test site. My plan is to move directory to main domain once working.

Updated for access info, thanks for the hint.

Link to comment
Share on other sites

  • 0

I'd like to piggy back on this thread, as I'd have the same thread title.

I would like to change the subject of an order status email. I get the same "No Subject was found for bankwire in the database" error when I click the order status to translate. I have it in my themes/theme/mails/language folder.

Where can I change the order status? I am assuming I can change the name of the order status in Orders>Statuses, but I'd like to keep that one shorter/different (for usability purposes in the backend) than in the email subject.

Link to comment
Share on other sites

  • 0
On 11/11/2023 at 12:53 PM, 30knees said:

The mailalert.php is correct in my store but I am still unable to edit some subjects. What is the solution?

I get:

No Subject was found for bankwire in the database.

Email subjects for order status emails are not translatable in the same way as other emails.

Thirty bees collects information about email subject by parsing source code, and looking for pattern

Mail::Send($languageId, 'email_template', Mail::l('Email Subject'))

When it sees such code, it can associate email template 'email_template' with default subject 'Email Subject', and offer translation for it. The important think is that the email_template and Email Subject are literals - constant values.

This works for static emails only, the one that are know at the time when developer writes code. For order status that's very different. You can specify which email template should be sent dynamically (edit order status). The code to send email looks like this (using variables)

Mail::Send($languageId, $status->template, $status->name);

The translation system can't work with that, so nothing is offered for translation.

When sending emails for order statuses, order status name is always used as email subject.  Bleeding edge (1.6) contains new enhancement that let you have explicit email subject for each order status.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...