crudbooster export xls field has no effect while using callback or callback_php - laravel-5.5

Found a solution by commenting // if (Request::input('fileformat') == 'pdf') { on line 67 of export.blade.php, but dont know any issue come later

Related

D8: changing "login or register to post comments" text

I need to change the text "login or register to post comments" but for one specific node.
The answers I found so far do not work for me: 1) I couldnt get it to change via twig 2) I do not want to use translation tool or the string module since it would change the text everywhere.
I found this https://api.drupal.org/api/drupal/modules%21comment%21comment.module/function/theme_comment_post_forbidden/7.x but it appears to be only for D7.
For the "add comment" text, I managed to change the theme.theme:
function milu2_preprocess_links(&$variables) {
$node = \Drupal::routeMatch()->getParameter('node');
if ($node) {
if ($node->id() == 36) {
if (isset($variables['links']['comment-add'])) {
$variables['links']['comment-add']['link']['#title'] = t('NEW');
}
}
However, if I replace "comment-add" with "forbidden-comment" it does not work. Any ideas?
Another problem above is, it works perfectly on the node 36 page until I hit the button. Then it shows the form to input a comment, but the text "add comment" reverts to the default. Why is that? The URL still states its the node 36 "/comment/reply/node/34/field_xyz#comment-form"

How can i fix X-cart product page ? Product page is blank

I have x-cart site which is running from 4 years and suddenly product page is not working. we have not done any changes.
X-Cart DB Version: 4.1.9 GOLD
product page url : https://www.test.com/product.php?productid=40&cat=0&page=1&featured
I can see bellow error in log file "x-errors_php-190521.php"
PHP Fatal error:
Call to undefined function func_get_categories_list() in public_html/include/common.php on line 76
if (
!isset($cat)
|| $config['Appearance']['root_categories'] == 'Y'
) {
$categories = func_get_categories_list(0, false);
} else {
Line No 76: =>>> $categories = func_get_categories_list($cat, false);
}
so help us to solve this issue
1) Try to add the
x_load('category');
in the include/common.php right after the
case 'C':
line
2) Try to compare your product.php with the default one and localize the problem.
3) Try to compare your include/common.php with the default one and localize the problem.
4) Try to compare your include/categories.php with the default one and localize the problem.
5) Try to move x_load('category'); before the code switch ($current_area) {
6) Try to add the code include_once $xcart_dir . '/include/func/func.category.php'; before the code switch ($current_area) {
Key notes:
include/common.php was added in X-Cart 4.4.0
The func_get_categories_list function is defined in
include/categories.php file in X-Cart 4.1.9
The func_get_categories_list function is defined in
include/func/func.category.php file in X-Cart 4.4.0
It will be helpful to define the exact version of your files for that compare
files like include/func/func.core.php cart.php include/func/func.category.php include/func/func.order.php with the default ones.

Issue with SBOS ACCELERATORS module

in my sitecore instance i install SOLS ACCELERATORS Module,
when I verify my showconfig in /admin/showconfig.aspx
i found this error message
error on line 2383 at column 612: Extra happy at the end of the document
in app_config/include/Sitecore.SBOSAccelerators.config
I removed the following line
<pageextenders>
       <pageextender type="Sitecore.SbosAccelerators.Shared.PageExtenders.InsertAnalyticsDataExtender, Sitecore.SbosAccelerators" />
     </ pageextenders>
the showconfig.aspx works well
I tried to analyze the code of InsertAnalyticsDataExtender, but I found nothing until now,
someone already has this kind of problem?
thank you
ok that's fixed,
the author of SOLS ACCELERATORS Module, verify if the context of the current Site is not Shell or Sheel_Module beffor adding a hidden field with this ID "SC_ANALYTICS_PAGE"
but what happen if the contentType of the page is an XML or a json for example
in this case i'm going to have an error,
to fixe this issue just create a new class in your solution, inherite from
Sitecore.SbosAccelerators.Shared.PageExtenders.InsertAnalyticsDataExtender
add this methode to your class
public override void Insert()
{
// you can replace Context.Site.Name by Context.Page.Page.Response.ContextType=="Text/Xml"
if (Context.Site.Name == "admin")
return;
base.Insert();
}
after that go to Sitecore.SBOSAccelerators.Config and change your pageextender to use the new class
happy conding
If you pasted the part of the configuration directly from your config file, you have a type in the config. You cannot close any tag with whitespace at the beginning of the closing tags like this </ pageextenders>. Try without the space </pageextenders>:
<pageextenders>
<pageextender type="Sitecore.SbosAccelerators.Shared.PageExtenders.InsertAnalyticsDataExtender, Sitecore.SbosAccelerators" />
</pageextenders>

Why is php_template_preprocess_page function not called in Drupal 6x?

From another forum I found the following example:
"I was looking for a way to pull node data via ajax and came up with the following solution for Drupal 6. After implementing the changes below, if you add ajax=1 in the URL (e.g. mysite.com/node/1?ajax=1), you'll get just the content and no page layout.
in the template.php file for your theme:
function phptemplate_preprocess_page(&$vars) {
if ( isset($_GET['ajax']) && $_GET['ajax'] == 1 ) {
$vars['template_file'] = 'page-ajax';
}
}
then create page-ajax.tpl.php in your theme directory with this content:
<?php print $content; ?>
"
This seems like the logical way to do it and I did this, but the phptemplate_preprocess_page function is never called ... any suggestions?
I figured it out for myself from a Drupal Support Theme Development page:
"Maybe this helps
leahcim.2707 - May 29, 2008 - 05:40
I was trying to get the same thing done and for me this works, but I'm not sure if it is the correct way as I'm still new to Drupal:
in "template.php" I added the following function:
function phptemplate_preprocess_page(&$vars)
{
$css = $vars['css'];
unset($css['all']['module']['modules/system/system.css']);
unset($css['all']['module']['modules/system/defaults.css']);
$vars['styles'] = drupal_get_css($css);
}
I think after adding the function you need to go to /admin/build/themes so that Drupal recognises the function."
The part in bold is what did the trick ... you have to re-save the configuration so it recognizes that you've added a new function to the template.

getElementsByTagName setAttribute and regex javascript

i want to put rel=lightbox to some links that mediabox support using javascript.
i try this and wonder why it's not working?
test: http://jsbin.com/opica
please help edit this: http://jsbin.com/opica/edit
<script type="text/javascript">
var x=xmlDoc.getElementsByTagName("a");
var regexku=/^.+(((twit)|(tweet)|(com/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
for(i=0;i<x.length;i++)
{
a=x[i].getAttribute('href');
if (a.match(regexku) != null)
{
x.item(i).setAttribute("rel","lightbox");
}
}
</script>
So if you open the Error Console (Tools -> Error Console in Firefox), you'll see two errors on your page:
Error: xmlDoc is not defined
Source File: http://jsbin.com/opica
Line: 35
Error: invalid regular expression flag v
Source File: http://jsbin.com/opica
Line: 21, Column: 38
Source Code:
var regexku=/^.+(((twit)|(tweet)|(com/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
The later is fixed by escaping the slash as Bart suggested (com\/video).
The former says there's no such thing as xmlDoc. You probably meant the page's document, in which case you should replace it with document.
Next the whole thing probably won't work because you should run the script after the page is finished loading. In jQuery it's $(document).ready(function() { /* do your work here */ }), google how to do it using the whatever framework you're using (mootools-yui?).
After that as you can see, the rel attribute is set on the links: http://jsbin.com/elaca/edit. The fact that the whatever library you're using still doesn't work means you're using it wrong. You didn't even link to the page you've downloaded the library from so that someone could look up the documentation for you...
Try escaping the / between com and video.