Error "Navegar por"

55 views
Skip to first unread message

Ivan Cisneros

unread,
Jul 13, 2018, 9:42:29 AM7/13/18
to AtoM Users
¡Saludos a todos!

Estaba modificando, en el apartado Configuración, el menú. Quería quitar (que no se muestre en la página principal) el menú "Browse by". Primero eliminé Function y no hubo problemas, todo seguía funcionando, pero cuando elimine el menú browse by me salió el siguiente error...

¿Qué puedo hacer al respecto?

Navegar por

    Fatal error: Uncaught Error: Call to a member function hasChildren() on null in /usr/share/nginx/atom/apps/qubit/modules/staticpage/templates/homeSuccess.php:15 Stack trace: #0 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(3895): require() #1 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(3954): sfPHPView->renderFile('/usr/share/ngin...') #2 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(993): sfPHPView->render() #3 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(980): sfExecutionFilter->executeView('staticpage', 'home', 'Success', Array) #4 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(948): sfExecutionFilter->handleView(Object(sfFilterChain), Object(StaticPageHomeAction), 'Success') #5 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(1045): sfExecutionFilter->execute(Object(sfFilterChain)) #6 /usr/share/nginx/atom/vendor/symfony/lib/filter/sfCacheFilter.class.ph in /usr/share/nginx/atom/apps/qubit/modules/staticpage/templates/homeSuccess.php on line 15


error.png

Ivan Cisneros

unread,
Jul 13, 2018, 10:37:12 AM7/13/18
to AtoM Users
Los pongo un poco en contexto porque creo que fue poco clara la duda (entré en pánico) ja, ja.
Atom ya estaba instalado y funcionando sin problemas.

Lo señalado en rojo es lo que pretendía quitar para que sólo se mostrara la información del sitio (lo verde). Accedí al menú "Configuraciones" --> ("Menú") y ahí fue donde eliminé la parte "Navegar por".

Espero haberme dado a entender. Saludos.
error_1.png

sbr...@artefactual.com

unread,
Jul 13, 2018, 1:49:06 PM7/13/18
to AtoM Users
Hello Ivan

The "Browse" menu items in the Configuration->Menus section (see screenshot #1) are ALSO necessary for the dropdown menu at the top (see screenshot #2) to function correctly.  You cannot delete this entire "Browse" menu definition or this top drop down will not function correctly.  Individual items can be removed or added, but not the entire Browse menu.

Did you delete the entire 'Browse' section I've outlined in screenshot #1?  If so, you will need to re-add it, and the errors should go away - this will fix the top "Browse" drop down button.  I have added screenshots showing how these menu items are configured in a fresh 2.4.x system.


If you want to permanently remove the sidebar items you highlighted in red in your screenshot on the AtoM homepage, it is easiest to customize the theme by removing these lines:


You can make this modification in the file I've shown above, but be aware the when upgrading to the next version of AtoM (e.g. 2.5) you would need to remake this change as it will be overwritten with 2.5 code.

It appears you may have a custom theme in your plugins folder?  If this is true, you can override the file apps/qubit/modules/staticpage/templates/homeSuccess.php in your theme folder structure.  This is a better place to make this change as you will not have a problem with having to re-make this change when upgrading to 2.5.  

Make sure to restart php-fpm service and clear AtoM's cache (php symfony cc) afterwards making code changes.  Always a good idea to test changes in a test or demo system first to see how changes affect things before moving to a live system.


Steve


Steven Breker, BSc,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056
Screenshot-2.png
A-Browse.png
Screenshot-1.png
H-digital_objects.png
G-places.png
F-subjects.png
E-functions.png
D-repositories.png
C-actors.png
B-information_objects.png

Ivan Cisneros

unread,
Jul 13, 2018, 2:18:11 PM7/13/18
to AtoM Users
Hola Steve.

Es correcto, sí borré toda la sección "Browse". ¿Cómo puedo volver a agregar esa sección? Miré las imágenes que adjuntaste pero no me queda claro cómo hacerlo. Por cierto, ya no puedo entrar a las configuraciones, ingreso a la página y sólo me muestra el error.

Agradezco mucho tu ayuda. 

sbr...@artefactual.com

unread,
Jul 13, 2018, 3:58:38 PM7/13/18
to AtoM Users
Good point!  If you have a DB backup, that is one way to restore them.

If you do not have a backup, I am hoping you can still access the menu page directly by using your root URI and appending "/menu/list" to the end. Hopefully it will authenticate you and then present you with the menu edit page.

e.g.:
- If your root URI is:  https://atom.some.domain

If you can access this page, then you can use "Add New" to re-add the menu items in the order of my screen shots (A -> H).  First screen shot 'A' re-adds the top level item, and B-H are the menu items themselves.

Hope this helps!

Steve

Ivan Cisneros

unread,
Jul 13, 2018, 4:36:43 PM7/13/18
to AtoM Users
¡Estupendo, Steve, sí pude ingresar!

Intenté agregar el menú pero me pide escribir el PATH y en la imagen no está. Eres lo máximo gracias por la ayuda, ya estamos a nada de la solución.

sbr...@artefactual.com

unread,
Jul 13, 2018, 5:08:16 PM7/13/18
to AtoM Users
Hello Ivan

I can see why this is not working for you.  I will look at this and get back to you with an answer as soon as I can.

Steve

Ivan Cisneros

unread,
Jul 13, 2018, 9:18:21 PM7/13/18
to AtoM Users
Muchas gracias por tu ayuda . 

adjunto imagen por si no me di a entender.
path.png

sbr...@artefactual.com

unread,
Jul 14, 2018, 1:56:04 PM7/14/18
to AtoM Users
Hello Ivan

I have created a script which will add the Browse menu items back to your database.

1) Save this script on your AtoM server:  https://gist.github.com/sbreker/1a31fac59a4918cad4293b6d36ca9b47
2) Run from your AtoM root folder:

php symfony tools:run <Full_path_to_addBrowseMenu_script>

You should ensure you have a current backup of your database before running this script (or any script that will make changes to your database).

I will talk to the analysts about your issue to see if we can make this easier to deal with going forward.  Thanks for bringing this to our attention!


Steve

Ivan Cisneros

unread,
Jul 16, 2018, 10:17:24 AM7/16/18
to AtoM Users
Hola Steve.

Entendí que debo hacer lo siguiente:

Paso 1) Guardar el archivo en la ruta /usr/share/nginx/atom (Adjunto imagen 01).
Paso 2) Ejecutar el comando php symfony tools:run <Full_path_to_addBrowseMenu_script> estando dentro de esa carpeta (adjunto imagen 02).

¿Entendí bien las instrucciones? (aún no lo hago, no quiero empeorar la situación haciendo algo mal)

Gracias por la paciencia.
01.png
02.png

sbr...@artefactual.com

unread,
Jul 16, 2018, 1:02:15 PM7/16/18
to AtoM Users
Hello Ivan - I've added more detail to my instructions.  I think you've mostly got it:

1) Make sure you have a current backup of your database before running the script. This is good practice before making any changes to the database like this.
2) copy the file https://gist.github.com/sbreker/1a31fac59a4918cad4293b6d36ca9b47 to your AtoM server.  Home folder is ok.
3) Ensure that you have the correct Linux permissions set on addBrowseMenu.php before running the script.
4) If you saved the file to /home/ivan (this is an example) then you can now run the script:
php symfony tools:run /home/ivan/addBrowseMenu.php
Reply all
Reply to author
Forward
0 new messages