Bienvenido, Invitado
Recordarme

TEMA:

system-message-container missing from WorldBiz template 1 año 3 semanas antes #250629

  • Autor del tema
  • rslabbert94
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
Hi there,

It seems as though Joomla's #system-message-container is missing from your WorldBiz template. (System Messages are turned on in the template settings.)

I am trying to use Joomla's renderMessages JS function, but that looks for the system-message-container.

See the code below from /media/system/core-uncompressed.js line 321:
Joomla.renderMessages = function( messages ) {
		Joomla.removeMessages();
		var messageContainer = document.getElementById( 'system-message-container' ),
		    type, typeMessages, messagesBox, title, titleWrapper, i, messageWrapper, alertClass;
		for ( type in messages ) {
			if ( !messages.hasOwnProperty( type ) ) { continue; }
			// Array of messages of this type
			typeMessages = messages[ type ];
			// Create the alert box
			messagesBox = document.createElement( 'div' );
			// Message class
			alertClass = (type === 'notice') ? 'alert-info' : 'alert-' + type;
			alertClass = (type === 'message') ? 'alert-success' : alertClass;
			alertClass = (type === 'error') ? 'alert-error alert-danger' : alertClass;
			messagesBox.className = 'alert ' + alertClass;
			// Close button
			var buttonWrapper = document.createElement( 'button' );
			buttonWrapper.setAttribute('type', 'button');
			buttonWrapper.setAttribute('data-dismiss', 'alert');
			buttonWrapper.className = 'close';
			buttonWrapper.innerHTML = '×';
			messagesBox.appendChild( buttonWrapper );
			// Title
			title = Joomla.JText._( type );
			// Skip titles with untranslated strings
			if ( typeof title != 'undefined' ) {
				titleWrapper = document.createElement( 'h4' );
				titleWrapper.className = 'alert-heading';
				titleWrapper.innerHTML = Joomla.JText._( type );
				messagesBox.appendChild( titleWrapper );
			}
			// Add messages to the message box
			for ( i = typeMessages.length - 1; i >= 0; i-- ) {
				messageWrapper = document.createElement( 'div' );
				messageWrapper.innerHTML = typeMessages[ i ];
				messagesBox.appendChild( messageWrapper );
			}
			messageContainer.appendChild( messagesBox );
		}
	};

From what I understand this should be part of the template by including <jdoc:include type="message" /> in the template index file. That is how it is included in protostar, but I am not sure how you do it with gantry?

Thank you!
Rich

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

system-message-container missing from WorldBiz template 1 año 3 semanas antes #250634

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderator
  • Moderator
  • Mensajes: 7799
  • Karma: 3
  • Gracias recibidas: 550
Hi,

in joomla3/templates/worldbiz/component.php
you can find this in line 151 and 152:
<jdoc:include type="message" />
				<jdoc:include type="component" />

This is included in that template

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by tihana.krivic.

system-message-container missing from WorldBiz template 1 año 3 semanas antes #250638

  • Autor del tema
  • rslabbert94
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
Thanks Tihana for your prompt response!

Unfortunately, I am aware of that. Although it is specified in the component.php, the "system-message-container" div is not included in the frontend. It should be since <jdoc:include type="message" /> is included in component.php.

You can see in your demo page, the "system-message-container" div is not included there either. https://crosstec.org/templatedemos10/

Regards,
Rich

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

system-message-container missing from WorldBiz template 1 año 3 semanas antes #250640

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderator
  • Moderator
  • Mensajes: 7799
  • Karma: 3
  • Gracias recibidas: 550
Hi,

yes, I see.
This is how the template seems to work.
I'll see what I can do so I'll get back to you :)

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

system-message-container missing from WorldBiz template 1 año 3 semanas antes #250641

  • Autor del tema
  • rslabbert94
  • Fuera de línea
  • Fresh Breezer
  • Fresh Breezer
  • Mensajes: 3
  • Gracias recibidas: 0
Thank you!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
Moderadores: ForumSupport
Tiempo de carga de la página: 0.046 segundos