So I installed TP on
https://www.whatsurbeef.net/index.php
Can you tell me why some of the links on the front page are broke. You should see what I mean when you get there.
The Read More I'm guessing.
Seems the html is broken, I'll look in to it later today as it's really early in the uk.
Some strange stuff going on in there, I've not seen that before. Error console is throwing up some extra head and body tags, and
Extra "<html>" tag found. Only one "<html>" tag should exist per document.
Unexpected start tag.
Unmatched end tag.
Unexpected DOCTYPE. Only one DOCTYPE is allowed and it must occur before any elements.
Might not be anything to do with this, but wondering if something else is interfering with the page, the block(s) across the top perhaps.
Was just looking at it as well: the extra tags are from the first block itself:
It seems that block contains extra Html code as well as css elements: must be in the block itself. Dangerous, but I don't think that causes issues with the read more links though.
I would like to know what frontage layout is chosen: I am guessing it is layout 4?
Quote from: @rjen on December 03, 2018, 07:08:37 AM
Was just looking at it as well: the extra tags are from the first block itself:
It seems that block contains extra Html code as well as css elements: must be in the block itself. Dangerous, but I don't think that causes issues with the read more links though.
I would like to know what frontage layout is chosen: I am guessing it is layout 4?
Just tried it on my live testsite, it is broken. ??? http://cctestsite.info/testsite3/index.php
Ok, found it in my test site as well: there is a problem with the read more links and forum posts, and (of course) it only breaks in 2.1...
We'll need to check the exact cause...
Quote from: @rjen on December 03, 2018, 07:26:10 AM
Ok, found it in my test site as well: there is a problem with the read more links and forum posts, and (of course) it only breaks in 2.1...
We'll need to check the exact cause...
Thanks, I will just add the problem seems to exist which ever layout used, so guess we can knock that one on the head. ;)
bigguy, really sorry, we obviously missed this during testing the last versions, we'll try and get you sorted asap. This is a problem we have with lack of beta testers unfortunately, no excuse though I should have checked it. :-[
Quote from: @rjen on December 03, 2018, 07:26:10 AM
Ok, found it in my test site as well: there is a problem with the read more links and forum posts, and (of course) it only breaks in 2.1...
We'll need to check the exact cause...
Can you let me know the configuration? I have forum posts and read more enabled and it's ok for me with the default layout.
See here for details:
https://test2.fjr-club.nl/index.php
I have tried:
Only forum-posts
Selected topics + articles on the frontpage
Forum-posts and articles - sorted on date
and they all break atm ...
Articles layout for frontpage set to D
It is funny: the code is working fine for 2.0 and there is no syntax problem: I get the feeling 2.1 is somehow affecting the display of links is the message body it seems...
Ok I've tried every combination I can and they all work ok here.
So can we all confirm the PHP Version used, frontpage layout setting and style.
Also what version of SMF 2.1 are you using, mine is the latest downloaded this morning. Revision 82b72df32a553b0dc9f8069099af0cee9786e418
Just updated my local install to todays version of Github and it still breaks...
You can check my phpinfo in my signature...
I think I found the cause of the problem... since we inject the Read More link onto the body text the SMF2.1 parser may affect it?
This code in Subs.php seems to cause the issue...
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" class="bbc_link" target="_blank" rel="noopener">$1</a>',
'validate' => function (&$tag, &$data, $disabled)
{
$data = strtr($data, array('<br>' => ''));
$scheme = parse_url($data, PHP_URL_SCHEME);
if (empty($scheme))
$data = '//' . ltrim($data, ':/');
},
I could be wrong. Tino, can you check this?
Ok, yes, that's it.
When deactivating this option in SMF settings the links work...
Admin > Configuration > Bulletin Board code: Automatically link posted URLs
This 2.1 function seems to break the Read More link if activated...
So bigguy, for now you can consider deactivating that option till we find a fix...
Weird I also have that checked and its ok.
Quote from: tino on December 03, 2018, 11:22:59 AM
Weird I also have that checked and its ok.
and now what?
This settings makes and breaks the Read More links on the forum posts, so it must be at least related to the issue...
Perhaps it would be better to not include the Read More link in the body text, but add it separately somehow?
That way it will not be touched by SMF 's parser anymore...
Quote from: @rjen on December 03, 2018, 11:41:03 AM
Quote from: tino on December 03, 2018, 11:22:59 AM
Weird I also have that checked and its ok.
and now what?
This settings makes and breaks the Read More links on the forum posts, so it must be at least related to the issue...
Perhaps it would be better to not include the Read More link in the body text, but add it separately somehow?
That way it will not be touched by SMF 's parser anymore...
My issue is it doesn't break for me... Second I can't see the path where we call the forum posts and then put it through parse_bbc...
QuoteSecond I can't see the path where we call the forum posts and then put it through parse_bbc...
Sorry, can you explain what you mean? Perhaps I am incorrectly using the parser reference.
What I see is that TPortal.php collects the posts to be displayed and adds a "Read More" link to the $row['body']
Then sometime later the $row['body'] is outputted onto the frontpage. I am not seeing where this happens in the code, but I assume somewhere the SMF logic kicks in and it changes the link on screen...
Any hints as to where that happens would be appreciated...
Quote from: @rjen on December 03, 2018, 11:53:54 AM
Any hints as to where that happens would be appreciated...
I can't see where it does that. It would be in the TPortal.template.php I would expect.
If disabling it fixes the issue then it is related to that somehow... I just can't work out how :'(
Here are all the instances we use parse_bbc, with the line number after the file name.
grep -nr parse_bbc *
Sources/TPSubs.php:1686: echo parse_bbc($context['TPortal']['article']['intro']), '<p><b><a href="' .$scripturl . '?page=' , !empty($context['TPortal']['article']['shortname']) ? $context['TPortal']['article']['shortname'] : $context['TPortal']['article']['id'] , '' , WIRELESS ? ';' . WIRELESS_PROTOCOL : '' , '">'.$txt['tp-readmore'].'</a></b></p>';
Sources/TPSubs.php:1688: echo parse_bbc($context['TPortal']['article']['intro']);
Sources/TPSubs.php:1706: echo parse_bbc($context['TPortal']['article']['body']);
Sources/TPSubs.php:1764: echo parse_bbc($context['TPortal']['blockarticles'][$context['TPortal']['blockarticle']]['body']);
Sources/TPSubs.php:2336: $row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
Sources/TPdlmanager.php:544: 'description' => $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc(trim(strip_tags($row['description']))) : $row['description'],
Sources/TPdlmanager.php:690: 'description' => $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc(trim(strip_tags($row['description']))) : $row['description'],
Sources/TPdlmanager.php:774: 'description' => $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc(trim(strip_tags($row['description']))) : $row['description'],
Sources/TPdlmanager.php:930: 'description' => $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc(trim(strip_tags($row['description']))) : $row['description'],
Sources/TPdlmanager.php:1051: 'ingress' => $context['TPortal']['dl_wysiwyg']=='bbc' ? parse_bbc(trim(strip_tags($row['ingress']))) : $row['ingress'],
Sources/TPdlmanager.php:1350: 'description' => $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc(trim(strip_tags($row['description']))) : $row['description'],
Sources/TPortal.php:750: 'text' => parse_bbc($row['value2']),
Sources/TPortal.php:892: $context['TPortal']['printbody'] = parse_bbc($what);
Sources/TPortalAdmin.php:267: $message = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($message2, false), array('<br />' => "\n", '</div>' => "\n", '</li>' => "\n", '[' => '[', ']' => ']')))));
Sources/TPmodules.php:591: $row['body'] = parse_bbc($row['body']);
Sources/TPmodules.php:1604: 'shout' => parse_bbc(censorText($row['value1'])),
Themes/default/TPsubs.template.php:1127: echo '<div class="blockbody" style="overflow: auto;' , !empty($context['TPortal']['blockheight_'.$side]) ? 'height: '.$context['TPortal']['blockheight_'.$side].';' : '' , '">' , parse_bbc($block['body']) , '</div>';
Themes/default/TPsubs.template.php:1163: echo parse_bbc($block['body']);
Themes/default/TPortalAdmin.template.php:350: <dd><div class="post">', !empty($mod['description']) ? parse_bbc($mod['description']) : '' , '</div>
Themes/default/TPShout.template.php:284: <p style="margin-top: 0;">' . parse_bbc($context['TPortal']['shoutbox_stitle'],true) . '</p><hr>';
Themes/default/TPdlmanager.template.php:55: <div class="windowbg tp_pad" style="margin-bottom: 5px">' , $context['TPortal']['dl_wysiwyg'] == 'bbc' ? parse_bbc($context['TPortal']['dl_introtext']) : $context['TPortal']['dl_introtext'] , '</div>';
tp-files/tp-modules/TPShout/Sources/TPShout.php:648: $row['value1'] = parse_bbc(censorText($row['value1']), true);
tp-files/tp-blockcodes/singleshout.blockcode:60: $row['value1'] = parse_bbc(censorText($row['value1']), true);
Can you check the settings for the allowed tags?
It seems that the url tag is causing it.
If I disable the url tag I can leave the autolink URL on, and it also works...
Quote from: @rjen on December 03, 2018, 11:59:41 AM
Can you check the settings for the allowed tags?
It seems that the url tag is causing it.
If I disable the url tag I can leave the autolink URL on, and it also works...
Makes no difference to me. :'( Works on both of them.
If I uncheck url than all looks good. The problem with me doing that is it breaks all my videos I have up from youtube.
Quote from: bigguy on December 03, 2018, 12:28:13 PM
If I uncheck url than all looks good. The problem with me doing that is it breaks all my videos I have up from youtube.
Can you enable
$db_show_debug = true;
Then copy all the queries used?
Where do I enable that again.
/me feels a little embarrassed
I found it. Here is mine:
Browser ID: firefox (is_firefox63, is_firefox, is_gecko)
Templates: 4: index (default), TPsubs (default), TPBlockLayout (default), TPortal (default).
Sub templates: 8: init, html_above, body_above, tp_above, main, tp_below, body_below, html_below.
Language files: 6: index+Modifications.english (default), Arcade.english (default), ArcadeAdmin.english (default), TPortal.english (default), Stats.english (default), TPListImages.english (default).
Style sheets: 3: index.css, jquery.custom-scrollbar.css, responsive.css.
Hooks called: 58 (show)
Files included: 39 - 1335KB. (show)
Memory used: 6183KB.
Tokens: post-admin-login, post-admin-dbsc.
Cache hits: 9: 0.01069s for 36,912 bytes (show)
Cache misses: 3: (get modSettings, get tpFrontTheme, get menu_buttons-1_9-english)
Queries used: 27.
Quote from: @rjen on December 03, 2018, 01:22:05 PM
Quote$db_show_debug
Version: SMF 1.0+
Default value: (not set)
If set, enables query debug features -- full text of SQL queries will be displayed before execution. These are very useful for debugging purposes. To enable add $db_show_debug = true; to your Settings.php file before the closing ?>. Keep in mind that once this is enabled the output is shown to everyone.
I just did just that in my test site. Attached the queries...
Why is your's calling doTPpage? Or is that not from the frontpage.
Quote from: bigguy on December 03, 2018, 01:22:52 PM
I found it. Here is mine:
Browser ID: firefox (is_firefox63, is_firefox, is_gecko)
Templates: 4: index (default), TPsubs (default), TPBlockLayout (default), TPortal (default).
Sub templates: 8: init, html_above, body_above, tp_above, main, tp_below, body_below, html_below.
Language files: 6: index+Modifications.english (default), Arcade.english (default), ArcadeAdmin.english (default), TPortal.english (default), Stats.english (default), TPListImages.english (default).
Style sheets: 3: index.css, jquery.custom-scrollbar.css, responsive.css.
Hooks called: 58 (show)
Files included: 39 - 1335KB. (show)
Memory used: 6183KB.
Tokens: post-admin-login, post-admin-dbsc.
Cache hits: 9: 0.01069s for 36,912 bytes (show)
Cache misses: 3: (get modSettings, get tpFrontTheme, get menu_buttons-1_9-english)
Queries used: 27.
Thanks, can you also put the queries used? There is a button to press to show them all.
Sorry, that was not the frontpage...
attached the correct one
SET NAMES 'utf8'
in .../Sources/Load.php line 32, which took 8.202E-5 seconds at 0.02807999 into request.
SELECT id_theme, variable, value
FROM smf_themes
WHERE id_member = 0
AND id_theme IN (1, 1)
in .../Sources/ScheduledTasks.php line 953, which took 0.00119996 seconds at 0.04460311 into request.
SELECT data
FROM smf_sessions
WHERE session_id = '93ab053f3298e6d0101ecf700d3ebc35'
LIMIT 1
in .../Sources/Session.php line 138, which took 0.00047493 seconds at 0.05304718 into request.
DELETE FROM smf_sessions
WHERE last_update < 1543840113
in .../Sources/Session.php line 248, which took 0.00037003 seconds at 0.05359602 into request.
SELECT mem.*, COALESCE(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM smf_members AS mem
LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
WHERE mem.id_member = 1
LIMIT 1
in .../Sources/Load.php line 469, which took 0.00076199 seconds at 0.0542531 into request.
SELECT variable, value, id_member, id_theme
FROM smf_themes
WHERE id_member = 1
AND id_theme = 1
ORDER BY id_theme asc
in .../Sources/Load.php line 1815, which took 0.0004108 seconds at 0.06074119 into request.
SELECT value
FROM smf_tp_settings
WHERE name = 'standalone_mode'
in .../Sources/TPortal.php line 445, which took 0.00052905 seconds at 0.06430507 into request.
SELECT *
FROM smf_tp_variables
WHERE type IN ('layerhook', 'art_not_approved', 'dl_not_approved')
in .../Sources/TPortal.php line 495, which took 0.00032592 seconds at 0.06839013 into request.
SELECT id, modulename, blockrender, autoload_run, adminhook,
frontsection, permissions
FROM smf_tp_modules WHERE active = 1
in .../Sources/TPortal.php line 2907, which took 0.00023985 seconds at 0.0687592 into request.
SELECT * FROM smf_tp_blocks
WHERE off = 0
AND bar != 4
AND (
FIND_IN_SET('actio=viewquery', access2) OR FIND_IN_SET('actio=viewquery;sa=hide', access2) OR FIND_IN_SET('actio=allpages', access2))
AND 1
ORDER BY bar, pos, id ASC
in .../Sources/TPortal.php line 2182, which took 0.00060105 seconds at 0.07298708 into request.
SELECT type, value, item
FROM smf_tp_data
WHERE type = 2
AND id_member = 1
in .../Sources/TPortal.php line 2809, which took 0.00023103 seconds at 0.07372999 into request.
SET NAMES 'utf8'
in .../Sources/Load.php line 32, which took 5.603E-5 seconds at 0.0155139 into request.
SELECT id_theme, variable, value
FROM smf_themes
WHERE id_member = 0
AND id_theme IN (1, 1)
in .../Sources/ScheduledTasks.php line 953, which took 0.00061989 seconds at 0.0236001 into request.
SELECT data
FROM smf_sessions
WHERE session_id = '93ab053f3298e6d0101ecf700d3ebc35'
LIMIT 1
in .../Sources/Session.php line 138, which took 0.00041199 seconds at 0.02989697 into request.
DELETE FROM smf_sessions
WHERE last_update < 1543840113
in .../Sources/Session.php line 248, which took 0.000247 seconds at 0.03035808 into request.
SELECT mem.*, COALESCE(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM smf_members AS mem
LEFT JOIN smf_attachments AS a ON (a.id_member = 1)
WHERE mem.id_member = 1
LIMIT 1
in .../Sources/Load.php line 469, which took 0.00048494 seconds at 0.03078604 into request.
SELECT variable, value, id_member, id_theme
FROM smf_themes
WHERE id_member = 1
AND id_theme = 1
ORDER BY id_theme asc
in .../Sources/Load.php line 1815, which took 0.00044513 seconds at 0.03655291 into request.
SELECT value
FROM smf_tp_settings
WHERE name = 'standalone_mode'
in .../Sources/TPortal.php line 445, which took 0.0003531 seconds at 0.03928494 into request.
SELECT *
FROM smf_tp_variables
WHERE type IN ('layerhook', 'art_not_approved', 'dl_not_approved')
in .../Sources/TPortal.php line 495, which took 0.00036407 seconds at 0.04305506 into request.
SELECT id, modulename, blockrender, autoload_run, adminhook,
frontsection, permissions
FROM smf_tp_modules WHERE active = 1
in .../Sources/TPortal.php line 2907, which took 0.00024009 seconds at 0.0434649 into request.
SELECT * FROM smf_tp_blocks
WHERE off = 0
AND bar != 4
AND (
FIND_IN_SET('actio=forum', access2) OR FIND_IN_SET('actio=forumall', access2) OR FIND_IN_SET('actio=forum', access2) OR FIND_IN_SET('actio=allpages', access2))
AND 1
ORDER BY bar, pos, id ASC
in .../Sources/TPortal.php line 2182, which took 0.00075006 seconds at 0.04761004 into request.
SELECT type, value, item
FROM smf_tp_data
WHERE type = 2
AND id_member = 1
in .../Sources/TPortal.php line 2809, which took 0.00023794 seconds at 0.04847407 into request.
UPDATE smf_log_online
SET log_time = 1543843713, ip = unhex('18eb2dcf'), url = '{\"action\":\"forum\",\"USER_AGENT\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko\\/20100101 Firefox\\/63.0\"}'
WHERE session = '93ab053f3298e6d0101ecf700d3ebc35'
in .../Sources/Logging.php line 132, which took 0.00249219 seconds at 0.04902291 into request.
SELECT
c.id_cat, c.name AS cat_name, c.description AS cat_desc,
b.id_board, b.name AS board_name, b.description,
CASE WHEN b.redirect != '' THEN 1 ELSE 0 END AS is_redirect,
b.num_posts, b.num_topics, b.unapproved_posts, b.unapproved_topics, b.id_parent,
COALESCE(m.poster_time, 0) AS poster_time, COALESCE(mem.member_name, m.poster_name) AS poster_name,
m.subject, m.id_topic, COALESCE(mem.real_name, m.poster_name) AS real_name,
(CASE WHEN COALESCE(lb.id_msg, 0) >= b.id_last_msg THEN 1 ELSE 0 END) AS is_read, COALESCE(lb.id_msg, -1) + 1 AS new_from,
c.can_collapse,
COALESCE(mem.id_member, 0) AS id_member, mem.avatar, m.id_msg
FROM smf_boards AS b
LEFT JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
LEFT JOIN smf_messages AS m ON (m.id_msg = b.id_last_msg)
LEFT JOIN smf_members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN smf_log_boards AS lb ON (lb.id_board = b.id_board AND lb.id_member = 1)
WHERE 1=1
AND b.child_level BETWEEN 0 AND 1
ORDER BY c.cat_order, b.child_level DESC, b.board_order DESC
in .../Sources/Subs-BoardIndex.php line 120, which took 0.00300908 seconds at 0.05587292 into request.
SELECT mem.id_member, mem.real_name, mo.id_board
FROM smf_moderators AS mo
INNER JOIN smf_members AS mem ON (mem.id_member = mo.id_member)
WHERE mo.id_board IN (2, 1, 6, 19, 5, 20, 4, 3, 21, 16, 12, 11, 10, 9, 8, 7, 28, 30, 27, 26, 25, 15, 14, 31, 13)
in .../Sources/Subs-Boards.php line 1307, which took 0.00045514 seconds at 0.05982089 into request.
SELECT mg.id_group, mg.group_name, bg.id_board
FROM smf_moderator_groups AS bg
INNER JOIN smf_membergroups AS mg ON (mg.id_group = bg.id_group)
WHERE bg.id_board IN (2, 1, 6, 19, 5, 20, 4, 3, 21, 16, 12, 11, 10, 9, 8, 7, 28, 30, 27, 26, 25, 15, 14, 31, 13)
in .../Sources/Subs-Boards.php line 1347, which took 0.00036907 seconds at 0.06032991 into request.
SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
COALESCE(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
FROM smf_messages AS m
INNER JOIN smf_topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN smf_boards AS b ON (b.id_board = t.id_board)
LEFT JOIN smf_members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_msg >= 7091
AND b.id_board != 14
AND 1=1
AND t.approved = 1
AND m.approved = 1
ORDER BY m.id_msg DESC
LIMIT 12
in .../Sources/Subs-Recent.php line 51, which took 0.0010469 seconds at 0.0674901 into request.
SELECT
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online,
mg.online_color, mg.id_group, mg.group_name, mg.hidden, mg.group_type, mg.id_parent
FROM smf_log_online AS lo
LEFT JOIN smf_members AS mem ON (mem.id_member = lo.id_member)
LEFT JOIN smf_membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = 0 THEN mem.id_post_group ELSE mem.id_group END)
in .../Sources/Subs-MembersOnline.php line 78, which took 0.00057602 seconds at 0.09987593 into request.
SELECT
mem.id_member, mem.last_login, mem.real_name, mem.member_name, mem.show_online,
mg.online_color, mg.id_group, mg.group_name
FROM smf_members AS mem
LEFT JOIN smf_membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = 0 THEN mem.id_post_group ELSE mem.id_group END)
WHERE mem.last_login >= 1543757313
in .../Sources/Subs-UsersOnlineToday.php line 135, which took 0.00039315 seconds at 0.10055494 into request.
UPDATE smf_log_activity
SET
hits = hits + 1
WHERE date = '2018-12-03'
in .../Sources/Logging.php line 404, which took 0.00294495 seconds at 0.10179806 into request.
SELECT id_member, alert_pref, alert_value
FROM smf_user_alerts_prefs
WHERE id_member IN (1, 0)
AND alert_pref IN ('alert_timeout')
in .../Sources/Subs-Notify.php line 48, which took 0.00050187 seconds at 0.10826206 into request.
SELECT modulename, permissions, languages
FROM smf_tp_modules
WHERE active = 1
in .../Sources/TPSubs.php line 183, which took 0.00020409 seconds at 0.1090939 into request.
SELECT value1 AS name , value3 AS href , value7 AS position
FROM smf_tp_variables
WHERE type = 'menubox'
AND value3 LIKE 'menu%'
AND value5 = 0
in .../Sources/TPassimilate.php line 276, which took 0.00020981 seconds at 0.10941911 into request.
SELECT COUNT(*)
FROM smf_log_errors
in .../Sources/Subs.php line 4633, which took 0.00024509 seconds at 0.10977197 into request.
gotta go get a coffee brb.
Quote from: @rjen on December 03, 2018, 01:27:06 PM
Sorry, that was not the frontpage...
attached the correct one
The only difference I can see is yours has a block article. Although no idea how to enable that one >:(
Ok, I have now removed all panels and set the frontpage to 'Selected topics only'
Quote from: @rjen on December 03, 2018, 01:40:29 PM
Ok, I have now removed all panels and set the frontpage to 'Selected topics only'
Same and now mine does the same queries as your's but still works :knuppel2: :knuppel2: :knuppel2: :doh: :doh: ::)
I just don't get it!
My front page has these options checked/enabled:
Forum-posts and articles - sorted on date
Frontpanel will be added before content
D for article layouts and articles + icons
And what is this block of code.
(To reset custom layout, clear all text below and save)
I know where yours is failing now. It's in TPSubs and the function tp_renderarticle
I don't have the same issue and can't replicate at all but I can see how it would fail as Read More is already set when parse_bbc is called again in that function.
Is there anyway to fix it at all. ??
Quote from: bigguy on December 03, 2018, 02:15:34 PM
Is there anyway to fix it at all. ??
Yes... I just have to break it ;D
I have that file open and found the location. Is there supposed to be two lines like this:
global $context, $txt, $scripturl, $boarddir, $smcFunc;
global $image_proxy_enabled, $image_proxy_secret, $boardurl;
Quote from: bigguy on December 03, 2018, 02:22:53 PM
I have that file open and found the location. Is there supposed to be two lines like this:
global $context, $txt, $scripturl, $boarddir, $smcFunc;
global $image_proxy_enabled, $image_proxy_secret, $boardurl;
Yeh there is nothing wrong with doing that. I did it to split the two globals up as one was for the avatar changes. Although now I have changed it again I should tidy that up..
The more I look at the code, the more I think it is a bug with the parse_bbc function. It is trying to parse html as bbc. That shouldn't be happening.
If you change the follwing in that function
echo parse_bbc($context['TPortal']['article']['body']);
To this
if (preg_match('/^\[[^\]]+]([^[]+)/', $context['TPortal']['article']['body'], $arr))
echo parse_bbc($context['TPortal']['article']['body']);
else
echo $context['TPortal']['article']['body'];
It should work ok providing you don't have bbc tags in your post.
That looks a lot better. Very awesome. 8) Works like a charm. O0
Quote from: bigguy on December 03, 2018, 02:51:23 PM
That looks a lot better. Very awesome. 8) Works like a charm. O0
That isn't a long term fix, it just solves it for now whilst we investigate the actual cause of the problem.
Well, glad I could point it out to ya's. Thanks for the temp fix guys. It'll be nice when fixed permanently.
Thanks for you patience.
We have been doing quite some testing on TP2.1 recently, but I am quite sure there may be more things missed, also due to the codebase that is still changing all the time >:(
Since you are using 2.1 for 'real' you may find issues before we do: any report is welcome!
I will make sure I report anything I find. ;)
I just did a clean install of SMF from todays copy and 1.6.1 and I still can't recreate this issue. I don't know what is causing it as the parser shoud just handle the input correctly.
Can someone else do a completely clean install and let me know the results?
I have a clean install locally that I installed a few weeks ago.
This morning I overwrote all files with Github version of today and then I ran the upgrade. Problem reproduced there too.
Is that clean enough?
Quote from: @rjen on December 03, 2018, 04:31:17 PM
I have a clean install locally that I installed a few weeks ago.
This morning I overwrote all files with Github version of today and then I ran the upgrade. Problem reproduced there too.
Is that clean enough?
I'd prefer a completely clean install with a empty database. But yeh that's pretty close... I don't get why mine doesn't do it. What is your boardurl on your local one?
Sorry, that's on Xampp, so you cant get to it...
Quote from: @rjen on December 03, 2018, 04:42:49 PM
Sorry, that's on Xampp, so you cant get to it...
I didn't want to access it... I just wanted to know the board url to see if it was becuse I was using a custom url here. Although I have tried localhost and the ip directly also.
I've replied to your PM tino. You have access to test site 3 running 2.1 http://cctestsite.info/testsite3/index.php
Quote from: lurkalot on December 03, 2018, 05:36:52 PM
I've replied to your PM tino. You have access to test site 3 running 2.1 http://cctestsite.info/testsite3/index.php
Thanks, I can see it broken on yours, as per the others and it's controlled by Automatically link posted URLs so SMF is converting it incorrectly into bbc code then converting it back wrongly as well..
Ok so by manually breaking my TinyPortal install using the url from lurkalots site it breaks for me... so now to find out where SMF is falling over.
Sorry, I was away for dinner.
You lost me now: you break it by using a different URL? HOW?
My broken test site URL happened to be: http://localhost/forum/index.php
and the online one that broke was:
https://test2.fjr-club.nl/index.php
I guess buy adding this to the end of the url, like that broken link does. /%3Ca%20href=
I don't know though, all way over my head. :-[
By changing the readmore to be this.
$row['body'] .= '... <p><strong><a href="https://cctestsite.info/testsite3/index.php?topic=13">'. $txt['tp-readmore']. '</a></strong></p>';
I was way off the mark then. lol.. This is why I leave this stuff to the clever people. ;)
The more I debug it the more I wonder if we have either always abused the parse_bbc function or if it's got a bug.
I'm not sure if to raise it on GH for SMF2.1 or not
Ok so can you please try the following in TPortal.php in the two locations where we use readmore my copy of TPortal.php is so edited from this that I can't give you a line number.
$row['body'] .= '... <p><strong>'.$smcFunc['htmlspecialchars']('<a href="'. $scripturl. '?topic='. $row['id']. '">'. $txt['tp-readmore']. '</a>').'</strong></p>';
This gets around the bug....rather than actually solving it.
It's definitely an improvement...
see here: https://test2.fjr-club.nl/index.php
Now the other links in the postings are clickable again..
Before you submit the change, would you mind to include class="tp_readmore" ? I added that to the css to force enough margin for the Read More links...
$row['body'] .= '... <p class="tp_readmore"><strong>'.$smcFunc['htmlspecialchars']('<a href="'. $scripturl. '?topic='. $row['id']. '">'. $txt['tp-readmore']. '</a>').'</strong></p>';
Added it here, this is with the include class="tp_readmore" added. http://cctestsite.info/testsite3/index.php
Quote from: lurkalot on December 03, 2018, 07:40:19 PM
Added it here, this is with the include class="tp_readmore" added. http://cctestsite.info/testsite3/index.php
The css for that is still waiting to be merged...
Quote from: @rjen on December 03, 2018, 07:43:33 PM
Quote from: lurkalot on December 03, 2018, 07:40:19 PM
Added it here, this is with the include class="tp_readmore" added. http://cctestsite.info/testsite3/index.php
The css for that is still waiting to be merged...
Wasn't sure if anything else was going in, so held off. I edited the file on my site manually.
I can merge now if you wish. ;)
@tino. Was wondering if there's anything here that shines some light on the 2.1 bbc problems, https://github.com/SimpleMachines/SMF2.1/search?q=bbc&type=Issues
Quote from: @rjen on December 03, 2018, 07:43:33 PM
Quote from: lurkalot on December 03, 2018, 07:40:19 PM
Added it here, this is with the include class="tp_readmore" added. http://cctestsite.info/testsite3/index.php
The css for that is still waiting to be merged...
Those last pull requests, do they contain the fix for the read more links that tino posted, plus some more from yourself?
Just I tried it and they are broken again.
Just pushed a commit which should sort it for SMF 2.0 and SMF 2.1 it's the more elegant way to do the fix anyway. Shouldn't break anything backwards compatible mind. Also incremented all the version numbers to 1.6.2
The two PR together should make the fix, but I think the ... should have remained in the body text....
Thanks guys. Installed on my live 2.1 test site now, seems good atm. http://cctestsite.info/testsite3/index.php
Also added a beta topic for 1.6.2 and included the zip. ;)
Missing the spacing between the body and read more text though...
Quote from: @rjen on December 04, 2018, 06:54:35 AM
Missing the spacing between the body and read more text though...
Looks ok to me. ??? Got a screenshot of what it looks like, and what it should look like for comparison?
Quote from: @rjen on December 04, 2018, 05:46:28 AM
The two PR together should make the fix, but I think the ... should have remained in the body text....
The only way this will work is if we get SMF to change parse_bbc
The bbc stuff, would this related to the smileys not showing on the front page, I'm assuming in those promoted posts and articles. I just saw a post on his site saying they were not working. They do on my test site running 1.6.2 though.
Quote from: lurkalot on December 04, 2018, 07:08:03 AM
Quote from: @rjen on December 04, 2018, 06:54:35 AM
Missing the spacing between the body and read more text though...
Looks ok to me. ??? Got a screenshot of what it looks like, and what it should look like for comparison?
Never mind, it looks the way it is supposed to. Just realised I was on my mobile this morning, and refreshing the cache had not been done...
And Tino: you where right to split the Read More text into a separate variable. When I saw the code I was afraid that the three dots would be split from the body text like so...
Quote
end of Body text
... Read More
but again, on a pc it shows I was wrong...
What's this about Smileys not showing on promoted posts?
I am seeing at least one...
Just read your reply on whatsyourbeef Mick: you are right: latest code fixes it: the quick and dirty workaround that they are using now actually will cause this because it is no longer parses the body text...
Quote from: @rjen on December 04, 2018, 07:51:11 AM
Just read your reply on whatsyourbeef Mick: you are right: latest code fixes it: the quick and dirty workaround that they are using now actually will cause this because it is no longer parses the body text...
Thanks, thought that was the case. :)
Thinking perhaps we should add bigguy to the beta group, the more testers the merrier imo. As long as he's happy with that of course. ;)
Quote from: @rjen on December 04, 2018, 07:51:11 AM
Just read your reply on whatsyourbeef Mick: you are right: latest code fixes it: the quick and dirty workaround that they are using now actually will cause this because it is no longer parses the body text...
Actually while you were there, did you notice when clicking to a article category from the front page article, Giving Support
https://www.whatsurbeef.net/index.php Gives this, https://www.whatsurbeef.net/index.php?cat=ga
The text seems shifted to the left and is slightly cut off. But fine when viewing the actual article. Not sure if this is another bug when running in 2.1. Doesn't appear to do this on a 2.0.15 based install, or at least I can't replicate it.
I am not seeing what you mean. But I have no account there and you do. Does it show this as guest too?
I can see the same as lurkalot on a PC. When viewing on the category listing it's slightly off the page.
It however doesn't do the same on my test one here so I think it's a styling issue with that site.
I see it now, and it is TP related I am afraid.
Caused by tp_col16, which has a style of: margin-left: -20px;
Line 41 of tp_style.css...
need to check why that is not giving this issue in curve2
Strange! That line is not in our css ... did someone remove that recently?
Never mind: I just compared the tp_style.css from his site to the 'official' version: he has made some changes, so I must assume that's his own handywork...
I did make changes yes. Just a few though in the css.
I zipped up my css file for ya's
Quote from: bigguy on December 04, 2018, 11:43:43 PM
I did make changes yes. Just a few though in the css.
That's up to you of course, one of those changes is causing what's in attached image though...
Quote from: @rjen on December 05, 2018, 08:27:57 AM
Quote from: bigguy on December 04, 2018, 11:43:43 PM
I did make changes yes. Just a few though in the css.
That's up to you of course, one of those changes is causing what's in attached image though...
Slight tangent, I think we should offer a override css file for people who want to have custom css, which doesn't get modified by the installer.
Yeah I saw that spot you pointed out @rjen. I just didn't get around to changing that spot as well. I moved the avatar or and the title as well at that spot in the css.
Quote from: tino on December 05, 2018, 11:45:20 AM
Quote from: @rjen on December 05, 2018, 08:27:57 AM
Quote from: bigguy on December 04, 2018, 11:43:43 PM
I did make changes yes. Just a few though in the css.
That's up to you of course, one of those changes is causing what's in attached image though...
Slight tangent, I think we should offer a override css file for people who want to have custom css, which doesn't get modified by the installer.
That's a great idea. css overrides would be beneficial in several places imo, especially blocks.
The reason I made those changes in the css is because the articles and the posts on the front page are pushed over to the right a bit. It looks off to me so I had to push it back to the left and add a color to the background of the posts and articles.