CssToHead problem after upgrade to 2.10.0

keesN

Ok backup didnt solve - so we are still with the same problem...

keesN

Ok can you hold on for a while?
Site is being restored to an older version...


Gast

the template works for me now in a simple testarea with a page and some news - so something must be different

is it possible, to give me admin-access to this page?

keesN

Hmmm.... unfortunately, that didnt solve it either...

Gast

#13
simple problem, if you see the code  ;-)

here your originalcode line between line 28 and line 35

</head>
<?
php // allows to include optional module files (frontend.css, frontend.js) into the head
if(function_exists('register_frontend_modfiles')) {
  
register_frontend_modfiles('css');
  
register_frontend_modfiles('js');
?>

<body scroll="auto">


please move the php-part (Ln 29 - Ln 34) into the head area, minimum into the top of the ending </head>. its actual between ending </head> and beginning <body>

P.S.: dont forget to remove the double slashes in modules / output_filter / filters / filterCSStoHead.php  // Ln 29

keesN

Yes in this template there is this function:

<?php // allows to include optional module files (frontend.css, frontend.js) into the head
if(function_exists('register_frontend_modfiles')) {
  register_frontend_modfiles('css');
  register_frontend_modfiles('js');
} ?>

I included the index.php as an attachment.

Gast

i see it, thanks

but here is the problem, a ending </head>, then a link to the css, then <opening <body>



its no help for you, but the best example for this exception "malformed document created"

back to the topic....
QuoteThere is a specific template build (not by me) for this page.

maybe, the problem is inside of the template. if you want, feel free and send me this template via email or post the index.php here
or you compare it with the other (working) template.
- important things:
- do you use register_frontend_modfiles(....) in this template?
- any other code (like my postings) in this index.php?

keesN

The page "nieuws" is a combination of single news items.
There is a specific template build (not by me) for this page.
If i put the slashes in front on line 29 i get a blank page on the newspage.
The single newsitems return a blank page as well btw.

Gast

Quote from: keesN on August 21, 2017, 04:04:47 PM
What sort of inclusions in the news do you mean? Images, links etc?

inclusion from a different, foreign source with no control for the content
any examples: if you write your own news, you know, its not possible, to build malformed content, if you use only the editor in news to add the content, but if you copy that news from a third party webpage, its possible, that this webpage use malformed content

other example: a wrapper inside of a iframe in connection with one of the conditions in filterCSStoHead.php

if the filter works, he try to move a <link> or a <style> inside of the defined areas to the correct place between <head> and </head>. if the output content use a double <body> or double <head>, its not possible, to found the correct start point

Gast

the conditions in the filterCSStoHead, are very simple to read and to understand
see the uncommented lines 19 - 23 in this file. if one of the condition is TRUE, you get the exception "malformed document created", because, W3C say's, its malformed

pls go to modules / output_filter / index.php
open this file with a simple editor and deactivate the line 29 with this content
Quote'CssToHead',
add a double slash (//) in the front of this line, then save the file and upload it to the server (if needed)

after this, the page has to load and i can tell you, where the problem come's from

keesN

#7
Hi,

Indeed the module anynews is installed.

WB version is 2.10.0

Activating another template does not solve the problem.

What sort of inclusions in the news do you mean? Images, links etc?

Gast

whats the used WB-Version - WB 2.10.0 ??

- other modules like Anynews in use?
- any other third party products like weather, locale temperature, advertisments etc there in use?
- any changes, if you use the DefaultTemplate for a test? (remember, its possible, to set this (or any other installed) template for a specially page only - see page settings of this page)?
- any inclusions in the news??

maybe, you can set the used template there to a working template, so that i see the source code of this page

keesN

Hi,

I am new to WebsiteBaker, sorry if you have to repeat yourself...

The page nieuws has the module "news" activated.

If i search this module, only the file rss.php contains these links, but they dont link to a css file.

Gast

i try it again.... the problem is not the output-filter-module, its in one of the on this pages used modules
in the most cases, you found in the view.php or included files a code like this

<link....>

to include a css-file - thats the problem

pls go into the section administration of this page nieuws.php and tell me, what kind of modules are in use there

simple solution for this case: use @import in frontend.css instead of this <link...>

keesN

I have the same problem on this page: http://www.gymnasiumleiden.nl/content/nieuws.php

I tried to update the output_filter module but somehow the CMS doesnt recognize this upgrade.

- I cannot uninstall via the cms the old version
- When i upload the updated module, i get the notice this module already exists
- When i upload it via ftp and select upgrade in the advanced fields, nothing happens.

Problem still exists...

Any ideas?

Gast

do you have a section behind the form on the start page in your right block? there is the problem
in most cases a own head-area in this section is the problem or a <link> to a CSS-file inside of this section

QuoteAs I noticed there is no such a filter (CsstoHead) after the upgrade.
the filter is integrated now in wb

kdro

After an upgrade to 2.10.0 I see an error: There was an uncatched exception
malformed document created in line (54) of (/modules/output_filter/filters/filterCssToHead.php)


Link: http://www.odszkodowania-za-smierc.pl/

As I noticed there is no such a filter (CsstoHead) after the upgrade.

I mention that after noticing the problem I upgraded "Output filter frontend" to v.1.1.7 - but I still can see the error.

Any solutions?