tmatbcorp VIP
Total posts: 41
04 Дек 2014 15:52

Hi,

I have juste upgraded my client's website (visible here: https://recrutement.terre.defense.gouv.fr ) from Joomla 2.5 to Joomla 3.3.6. I have upgraded all my extensions to fit J3.

Regarding Cobalt, we had Cobalt 7.9259 and I have installed pkg_cobalt.j3.media.v.8.79.zip then pkg_cobalt.j3.everything.v.8.602.zip.

When navigating on the website, a lot of errors show: - on front page, errors like "Warning: Illegal string offset 'image' in C:\wamp\www\components\com_cobalt\fields\image\image.php on line 202" - on parent menu, for example when clicking on "Sans BAC", blank page with fatal error "Call to a member function get() on a non-object in C:\wamp\www\components\com_cobalt\views\records\tmpl\default_menu_default.php on line 25" - on administrator interface, when I click on a record, a pop-in is displayed with an error message: "Error No permission Error: CB Login module not created (required)."

I have no idea on what to do about the first two errors, the third one might be a Community Builder issue, I am not sure...

I have tried upgrading first to Cobalt 7.9793 before installing Cobalt 8 but the result is the same.

Could you please help me? I you do, please explain very clearly because I am completely new to Joomla and do not know the application code since a team from another company had written it, we have no way of contacting them and we do not have any documentation (it sucks so much!).

Thanks a lot in advance.

Последние изменения: 12 Янв 2015


pepperstreet VIP
Total posts: 3,837
04 Дек 2014 23:08

on front page, errors like "Warning: Illegal string offset 'image' in C:\wamp\www\components\com_cobalt\fields\image\image.php on line 202"

on parent menu, for example when clicking on "Sans BAC", blank page with fatal error "Call to a member function get() on a non-object in C:\wamp\www\components\com_cobalt\views\records\tmpl\default_menu_default.php on line 25"

Did you follow the documentation article and advices, especially the "Final Steps"?


pepperstreet VIP
Total posts: 3,837
04 Дек 2014 23:16

tmatbcorp when I click on a record, a pop-in is displayed with an error message: "Error No permission Error: CB Login module not created (required)."

Cobalt v8 is almost a frontend powered extension. Except for some maintenace and mass operations.
The backend Records list/manager view and the edit feature does only work, if you are logged-in as Admin in frontend, too!

I assume you are using CB for login/register. Check first if CB and login is in place and working. Then login in frontend as Admin. Then try the Records -> edit link in backend again. I guess, the error is gone.


pepperstreet VIP
Total posts: 3,837
04 Дек 2014 23:27

Currently, I can't see any errors. Some links are pointing to custom Cobalt templates etc. I guess, templates and parameters are the main reasons for your previous issues. So, check ALL templates and field settings and resave them.

Did you sort things out?

BTW, cool parallax fx stuff on the site ;)


tmatbcorp VIP
Total posts: 41
05 Дек 2014 09:13

Thank you for your answers :).

pepperstreet Did you follow the documentation article and advices, especially the "Final Steps"?

I used method 2 (not the recommended one, I know) and did the first point of final steps but could not proceed entirely with the second one. Tell me if I am wrong but I understand I have to edit all sections, types and templates and save them (without modifying anything). I juste did it for types and sections but I couldn't for templates because almost nothing is clickable. You'll find here attached a screenshot to show you what I see for Cobalt templates: cobalt_templates

All I can do is uninstall, install and copy/rename the templates. The only clickable links are "autocomplete" and "smart" in the "category select" tab and "cobalt7" (is it normal I still have a cobalt7 thing when I installed cobalt8?), "default" and "verticaltree" in the "category index" tab. I cannot edit anything else.

pepperstreet Check first if CB and login is in place and working

I am indeed using CB 2.0.3. It seems to be working fine in backend, at least I can access everything and no error is displayed, but the frontend is not working, I also get the "Error: CB Login module not created (required)." message when trying to login in frontend. I assume this is a CB problem.

pepperstreet Currently, I can't see any errors

That is normal, the url I gave you is the live site still running on Joomla 2.5 with old perfectly working extensions :). Sadly I cannot give you access to the version I am working on since it is running on a VM which is only accessible through one of my company's computers.


pepperstreet VIP
Total posts: 3,837
06 Дек 2014 03:41

tmatbcorp I juste did it for types and sections but I couldn't for templates because almost nothing is clickable. All I can do is uninstall, install and copy/rename the templates.

You are looking at the Cobalt menuItem "Templates". That is only for some management, and the actions you mentioned already: copy, rename etc.

The "Final steps" in documentation and the re-save action refers to assigned templates. In other words: See your template parameters in all your Sections, Types and most likely some Fields. There you should have the correct templates assigned AND you should click the "edit button" with the small cog-icon. The template settings will open in a modal window, and there you can hit SAVE.

Also check, if you have heavily customized templates, or if they are based on "defaults".
If your custom templates do not produce a proper display, you might assign an extra "default" template... just to check the correct field output.


pepperstreet VIP
Total posts: 3,837
06 Дек 2014 03:54

tmatbcorp parent menu "Sans BAC" (much better since I edited Cobalt types and sections)

That looks like the Cobalt 8 Default template. A simple table layout.
Check the respective Section and General Parameters -> Templates -> List template

Your C7/J25 site seems to use a blog style layout.
I assume this is one of the templates called ADT_...
HeadsUp: The templates might load a specific CSS file. It loads automatically, if it has the same name as template.


BTW, the current site is reachable under this URL: http://www.recrutement.terre.defense.gouv.fr/


pepperstreet VIP
Total posts: 3,837
06 Дек 2014 04:00

tmatbcorp I am indeed using CB 2.0.3. It seems to be working fine in backend, at least I can access everything and no error is displayed, but the frontend is not working, I also get the "Error: CB Login module not created (required)." message when trying to login in frontend. I assume this is a CB problem.

Hence, CB2.0 is pretty new and plugins are still updated and under development. Did you have a previous CB 1.9.x installed?
Could only find 1 older unanswered topic in the Joomlapolis forum.

I would check the login module again. Do you really use their specific module? If the installer did not create it for any reason, you should create it manually in J! extensions manager.


tmatbcorp VIP
Total posts: 41
08 Дек 2014 14:57

Hi,

Thanks again for you answers.

pepperstreet The "Final steps" in documentation and the re-save action refers to assigned templates

Ok I see where it is at last (just starting to look into it now (16pm) because I had to work on something else this morning).

section_edit_tpl

Every "Record List" field had been deleted.

I edited all my sections and I am now left with two questions: - the old version of the website had always "none" selected for the "compare" field. Now "None" is not available anymore. Does this field matter? What is best between selecting "default" and selecting the same template as in "record list"? - when I click the cob-icon for "markup layout" field, nothing or at best only field titles are displayed within the window

edit_markup_field

If I enable error messages, I get an error on mint library : Notice: Undefined index: alpha in C:\wamp\www\libraries\mint\forms\formhelper.php on line 147 which is $fieldset = $fieldsets[$name]; from renderFieldset function. Does it mean I missed something during Cobalt installation? This happens only for the "markup layout" template parameters.

I edited my types without any problem but i am less successfull with the fields. For my first type, when I edit the "image" field, I do not have the same choices I had on the old Joomla.

Old:

old_joomla_image_field

New:

new_joomla_image_field

I can no longer choose sth_adt (which are indeed our custom templates). I assume this is why I have the "Illegal string offset 'image'" error almost everywhere on the website. Would you know why these templates do not appear anymore when editing fields? Some files may have been deleted during Cobalt8 installation perhaps? Or the database was not correctly updated?

I have a few general questions: - do I have to edit template parameters for every section and every type and every field? Or can I skip editing when the template is the same as for example in the previous section and I already edited it (yes I am lazy)? - when I edit template parameters, does it change things within the database or only in the source code?

pepperstreet Did you have a previous CB 1.9.x installed?

I did but it is a client request to use CB 2.0.3. I will try with CB 1.9.1 though and see what happens.

pepperstreet I really wonder why nobody is available anymore

Yes, I don't exactly know what happened but the client had issues with the previous team, especially with documentation and communication and that is why he wanted to change and picked us. The client is reliable but not technical. I think the previous developers were quite good but sadly they did not share their knowledge.


Sergey
Total posts: 13,748
09 Дек 2014 03:15

tmatbcorp he old version of the website had always "none" selected for the "compare" field. Now "None" is not available anymore. Does this field matter? What is best between selecting "default" and selecting the same template as in "record list"?

This parameter only matters if you emable compare in type parameters by selecting maximum number of compared articles. This template SHOULD BE vertical table template or any custom template that based on vertical table. This is template that designed for compare view.

tmatbcorp when I click the cob-icon for "markup layout" field, nothing or at best only field titles are displayed within the window

Did you change anuthing in template XML file? Actulay if you delet something there you can get that error. But I think you have to update XML content of template based on deafult markup template.

ANd the best way is just select default markup template because you cannot use your old templates there. To many changes there.

tmatbcorp I edited my types without any problem but i am less successfull with the fields. For my first type, when I edit the "image" field, I do not have the same choices I had on the old Joomla.

Looks like templates was lost during update. Just copy the same templates from old to new.

tmatbcorp do I have to edit template parameters for every section and every type and every field? Or can I skip editing when the template is the same as for example in the previous section and I already edited it (yes I am lazy)? - when I edit template parameters, does it change things within the database or only in the source code?

Yes. Because how CObalt 8 saves parameters is completely different from Cobalt 7. Now it stores parameters for the same template per every section and before it could only have one set of parameters per template.

My general suggestion is to set all templates that are provided with Cobalt. Do not use your old templates. And start from there. Then you can create some custom templates, but copy those templates based on those that are provided by Cobalt 8.

Templates are the crutial point with this update. Also Because of bootstrap. Your old templates will not be able correctly to display data in Joomla 3 series.


tmatbcorp VIP
Total posts: 41
09 Дек 2014 14:35

Sergey Did you change anuthing in template XML file

No I didn't change anything. I don't even know which file it is. Is it templateDetails.xml file in /templates/myTemplate? It looks the same as templateDetails.xml file in /templates/beez3.

Sergey the best way is just select default markup template

What consequences, if any, will it have on the website's appearance?

Sergey Looks like templates was lost during update

In /components/com_cobalt/fields/image/tmpl/input, a default_adt.php file exists. I can as well see full_adt.php and list_adt.php under /components/com_cobalt/fields/image/tmpl/output.

From where else could it have been deleted? If nowhere, how are these templates not displayed in fields parameters?

Sergey Yes. Because how CObalt 8 saves parameters is completely different from Cobalt 7. Now it stores parameters for the same template per every section and before it could only have one set of parameters per template.

How unconvenient! I have 18 sections and 15 types with 1 to 34 fields each!

We will not deliver any database dump to the client because he does not want to freeze the website even for one day. But he won't ever be willing to click on every template parameter for every section and every type and every field.

If he didn't make any change in sections, types and fields, would it be possible to deliver him only some data tables' dumps? Like js_res_sections, js_res_types, js_res_fields...?

Sergey My general suggestion is to set all templates that are provided with Cobalt. Do not use your old templates. And start from there. Then you can create some custom templates, but copy those templates based on those that are provided by Cobalt 8.

OK but I have no idea on how to do that.

Are you speaking of templates located under /templates folder? In /templates folder, I can see atomic, beez_20, beez3, beez5, protostar and system folders plus my own templates. If I compare my own custom templates with for example beez3, I can see no major difference. Atomic, beez3 etc do not seem to have been modified during Cobalt upgrade (no change detected by svn), is that normal or are there other templates somewhere else?

Where do I set templates provided by Cobalt? When editing templates parameters in for instance one of Cobalt sections, I can only choose between default or my custom templates. Are you suggesting I set default template for every section and every type and every field? Or do I have to change settings somewhere else?

And how is it going to help me later set my custom templates?


pepperstreet VIP
Total posts: 3,837
09 Дек 2014 19:49

(PS: No offend, but frankly speaking, it might be a better decision to stay with J25/C7 installation, until there is enough knowledge about Joomla itself, and specifically Cobalt structure and its own template system. This is very crucial and mandatory if you want to upgrade a complex site.)

Anyways, if there is a very urgent reason to switch to J!3 and C8, you have to dive into Cobalt documentation. At least the basics about templates are very important. I can't say if your ADT_ template are heavy customized or if they are just copies of the defaults i.e. "markup", "table" and "blog". Maybe the initial creator did not know about CSS possibilities, or how to override complete templates etc.

The key ...

is to get a running site without any crucial errors. In other words, get the data displayed in the first place... layout/design is not so important. That's more or less, what Sergey has suggested.

  • Start with 1 section ...
  • Check out what is the rough display style: Table or Blog style...
  • Set Section's templates (markup/list/category index), Type's templates (record full view) to a simple coresponding Cobalt DEFAULT template. At first time, ALWAYS remember SAVE template parameters!
  • Check the output in frontend. If there are field specific errors, also check and set the field's DEFAULT templates.

The sites data is displayed completely? - Try to investigate the custom ADT_ templates. What are the main differences, what are the important changes? - Try to mimic or transfer those changes to your own Templates: It really depends on the amount of customization. I would suggest to use as much as Defaults as possible. Adjust parameters and CSS classes and styles. If there is no other way, create your own custom templates.

Hence the C8 advanced template pack. There is an Adv.Table template with many interesting parameters. Easy to customize by configuration.


pepperstreet VIP
Total posts: 3,837
09 Дек 2014 20:05

Custom field output templates not showing up in backend

Either they are not compatible because of slightly different syntax...
but I think the main issue could be the naming scheme. Your screenshots show names with _ underscores. This might have a side-effect in J3.x, because this _ underscore is typically reserved for calling "sub templates". That means there is a main template like default.php and it loads related templates in the code. Those subTemplates start with the main template name default followed by an _ underscore and the subtemplate name i.e.: _subone, _subtwo etc. This is common practice in Joomla v3.

I think this was not a standard, nor an issue in Joomla 2.5

Suggestion

What happens if you rename your custom field templates? Simply change the _ underscore to a - hyphen/minus. Reload Cobalt backend screen...

I guess the templates will show-up.


If all this does not help..., always try the DEFAULT templates first! Customization might be done later on.


Sergey
Total posts: 13,748
10 Дек 2014 03:24

tmatbcorp What consequences, if any, will it have on the website's appearance?

No consequences, just working section without error.

tmatbcorp In /components/com_cobalt/fields/image/tmpl/input, a default_adt.php file exists. I can as well see full_adt.php and list_adt.php under /components/com_cobalt/fields/image/tmpl/output.

From where else could it have been deleted? If nowhere, how are these templates not displayed in fields parameters?

Then it should be in the list. May be file permissions? See if all of files have the same permissions.

tmatbcorp How unconvenient! I have 18 sections and 15 types with 1 to 34 fields each!

We will not deliver any database dump to the client because he does not want to freeze the website even for one day. But he won't ever be willing to click on every template parameter for every section and every type and every field.

If he didn't make any change in sections, types and fields, would it be possible to deliver him only some data tables' dumps? Like js_res_sections, js_res_types, js_res_fields...?

This is questionable. I agree in your situation it is inconvinient, but this is one of the most waited feature and appriciated by community very much.

Anyway, template parameters are not stored in database. Those are in files. And I I have mentioned, templates was fully refactored in Cobalt 8. SO you have to use new templates and most probably create new custom templates if it is needed.

I am sorry but I cannot do anything about that. We just follow Joomla development guide. Joomla 3 useres Twitter Bootstrap and all templates was refactored accordingly.

Cobalt 7 to Cobalt 8 is not a simple update and update of all templates is a REQUIRMENT which if we could avoid we would.

tmatbcorp Are you speaking of templates located under /templates folder? In /templates folder, I can see atomic, beez_20, beez3, beez5, protostar and system folders plus my own templates

No I am talking about fields templates, section templates parameters and type templates parameters. In other words Cobalt templates.

tmatbcorp Where do I set templates provided by Cobalt?

In the section

section

It type

type


tmatbcorp VIP
Total posts: 41
11 Дек 2014 15:38

Hi,

Thank you both for your help.

I have read some Cobalt documentation and I have finally understood better how Cobalt templates work. I now am able to see my customized templates in the templates list for Cobalt fields.

And we are going to have to re-write all our customized templates... Not funny be at least we have a solution, thank you for that!

I still get some warnings when accessing a custom view (either using a custom template or a default one): Warning JUser::_load : unable to load user with ID 13185 JUser::_load : unable to load user with ID 20644 Would you know where it commes from?

Moreover and more important, the items I get are not the same now as they were in the old version. In the foreach ($this->items AS $item) loop, I get (as an example for the first item):

  • for the old version

    [fields] => {"8":"{\"image\":\"images\\/actualites\\/SDR_2014_2\\/2014_11_14.jpg\",\"image_title\":\"\"}","9":"blabla1","10":"blabla2"} [fields_by_id] => Array ( [8] => JFormFieldCImage Object ( lot of parameters ) [9] => JFormFieldCTextarea Object ( lot of parameters ) )

  • for the new version

    [fields] => Array ( [8] => {"image":"images\/actualites\/SDR_2014_2\/2014_11_14.jpg","image_title":""} [9] => blabla1 [10] => blabla2 ) [fields_by_id] => Array ( [9] => JFormFieldCTextarea Object ( lot of parameters )

8, 9 and 10 are indeed the IDs of the fields corresponding to the type of content I am currently working on. I can see that some fields present in fields are missing in fields_by_id.

Could you please explain how fields_by_id works? To which ID does this fonction refer? And why isn't there at least also field with ID 8 in fields_by_id for the new website version?

Again, thanks a lot for your help


Sergey
Total posts: 13,748
12 Дек 2014 07:32

tmatbcorp I still get some warnings when accessing a custom view (either using a custom template or a default one): Warning JUser::_load : unable to load user with ID 13185 JUser::_load : unable to load user with ID 20644 Would you know where it commes from?

Did you delete any users? With Cobalt you cannot вдуеу users. Try to clean notifications table. Or better create users and set those IDs to those dummy isers. If you want you can block users but not delete.

tmatbcorp I can see that some fields present in fields are missing in fields_by_id.

In fields you see al fields. In fields_by_id you can only see fields for this view. Like fields for full article view or for list view.

tmatbcorp Could you please explain how fields_by_id works? To which ID does this fonction refer? And why isn't there at least also field with ID 8 in fields_by_id for the new website version?

Please reffer to this article.

http://docs.mintjoomla.com/en/cobalt/custom-templates-general

And then this one

http://docs.mintjoomla.com/en/cobalt/custom-templates-article/


tmatbcorp VIP
Total posts: 41
12 Дек 2014 09:18

Sergey Or better create users and set those IDs to those dummy isers

I just did that and it worked, thanks.

Sergey In fields you see al fields. In fields_by_id you can only see fields for this view. Like fields for full article view or for list view

OK that is what I didn't understand about fields_by_id.

However, I still don't get why fields_by_id only retrieves one of my fields and not the tow other ones.

For example for image field in myType type, I have set templates like this :

field_template

Then in my current view (template default_list_adt_myType.php), image field should be displayed as I set list_adt template for list view, should it not? But in var_dump($item), it is not even retrieved.

I get the same result if I set default templates for the image field (and by the way the other field that is not retrieved has default templates set for every view).

I must still be missing something... Any idea?


tmatbcorp VIP
Total posts: 41
12 Дек 2014 14:42

I have another question about filters.

I have to rewrite the filter template you can see here on the live site.

In Co7, we just had default_filter_adt_mySection.php/css/json/xml and the template was set in the section's template parameters.

Now in Co8:

Unfortunately the custom filter is not displayed. Instead, I get this:

filter

I think some configuration may be wrong in markup template for mySection.

Could you help me?


Sergey
Total posts: 13,748
15 Дек 2014 09:40
  1. Егкт on template compatibility in glonal Cobalt settings for nice template display.
  2. Check fields parameters to see what fields are in the list.

    2014-12-15_17-29-04

    Or you can also see fields visibility in the fields list

    2014-12-15_17-30-55 3.Now you can see filters in setions under binocular button. And there is no filter template any more. Filter template is in markup template now.

    2014-12-15_17-35-58


tmatbcorp VIP
Total posts: 41
15 Дек 2014 17:25

Sergey Check fields parameters to see what fields are in the list

I did and everything is fine. All the fields I want to display have "Yes" set for intro and full views... May these values be overridden somewhere?


Sergey
Total posts: 13,748
16 Дек 2014 07:17

Should not be. May be those fields are empty? Or do you have access rights for fields?

Работает на Cobalt