Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The partial '_field_mltext.htm' is not found. #238

Closed
chrisvidal opened this issue Mar 23, 2017 · 12 comments
Closed

The partial '_field_mltext.htm' is not found. #238

chrisvidal opened this issue Mar 23, 2017 · 12 comments

Comments

@chrisvidal
Copy link

October build 396

When opening a cms page, it throws this exception

Throws Exception
'October\Rain\Exception\SystemException' with message 'The partial '_field_mltext.htm' is not found.' in [redacted]/modules/system/traits/ViewMaker.php:65

@daftspunk
Copy link
Member

Interesting, I haven't noticed this on my installation. Try enabling edge updates to see if it resolves the issue.

@virtualLast
Copy link

virtualLast commented Apr 21, 2017

I enabled that setting, didnt change anything

@virtualLast
Copy link

had to manually create the files to make the error go away

@LukeTowers
Copy link
Contributor

You would have had to enable that setting and then update your October

@khoatran
Copy link

khoatran commented Sep 14, 2017

Guys, this issue happens because there are some differences in the way that OctoberCMS load form widgets in different versions.

I have exactly the same issue. Finally, I trace down to the code of Rainlab Translate plugin. At there, if you look at the function registerFormWidgets, you will see the code as below:

 public function registerFormWidgets() {
return [
            'RainLab\Translate\FormWidgets\MLText' => 'mltext',
            'RainLab\Translate\FormWidgets\MLTextarea' => 'mltextarea',
            'RainLab\Translate\FormWidgets\MLRichEditor' => 'mlricheditor',
            'RainLab\Translate\FormWidgets\MLMarkdownEditor' => 'mlmarkdowneditor',
            'RainLab\Translate\FormWidgets\MLRepeater' => 'mlrepeater',
        ];
}

If you are running an old version of October as my case (I haven't tried with the latest build 420), you will see this error. The way to fix it is: you will need to change this function into

 public function registerFormWidgets()
    {
        return [
            'RainLab\Translate\FormWidgets\MLText' => ['code' => 'mltext'],
            'RainLab\Translate\FormWidgets\MLTextarea' => ['code' => 'mltextarea'],
            'RainLab\Translate\FormWidgets\MLRichEditor' => ['code' => 'mlricheditor'],
            'RainLab\Translate\FormWidgets\MLMarkdownEditor' => ['code' => 'mlmarkdowneditor'],
            'RainLab\Translate\FormWidgets\MLRepeater' => ['code' => 'mlrepeater'],
        ];
    }

I hope this can help.

Cheers,

@LukeTowers
Copy link
Contributor

The code to support converting the new method to the old method has been in October since Build 378. See octobercms/october@bc16507#diff-34e42a18a94b81013305d1b5c5f69d42R101

I highly recommend that you update your October instance.

@khoatran
Copy link

Yes, Luke. I will. However, you know, process to upgrade things in big companies takes time and we need to verify very careful for every changes :). Btw, thanks for your help to point out the code changes

@khoatran
Copy link

khoatran commented Sep 14, 2017

I've just thought about another issue related to this. Somehow, the plugin must provide the backward compatibility with different versions of OctoberCMS.

In this case of the translate plugin, if the plugin author knows the version of the OctoberCMS core, he can rewrite the code to support different versions easier, just by adding checking version logic to call the proper method.

So, the question here is: how OctoberCMS release the version and can we get the version by the code inside the plugin ? I am sorry if this question is so obvious (in case everyone knows the way to get OctoberCMS version from the code but I don't know) :). I haven't checked into the OctoberCMS code deeply to get this answer yet.

@LukeTowers
Copy link
Contributor

@khoatran we don't support that approach in October. By default, you are not able to update plugins without also updating core. Thus, plugins should not have to support older versions of core. But, if you were restrained into something like that then you could probably look at using the system parameter model to get the core build information.

As a side note, this could be fixed for all versions of October simply by changing it to the array approach instead of the string approach.

@LukeTowers
Copy link
Contributor

Closing as it has been over a month since any activity on this occurred.

@yapsr
Copy link

yapsr commented Jul 10, 2023

Experiencing the same issue using October CMS version 2.2.35 and Rainlab Translate plugin v1.12.0

@daftspunk
Copy link
Member

This looks like a different issue from a long time ago, @yapsr.

@rainlab rainlab locked as resolved and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants