I'm modifying a website made with osCommerce (I didn't make this website), and one of the things I have to modify is the look of the home page. My problem is that I have modified the index.php file, and all the changes look fine.
However, when I click a link that has been written in PHP with this function:
<?php echo tep_href_link(FILENAME_DEFAULT,'cPath=24&sort=2a') ?>
(In /includes/filenames.php I have define('FILENAME_DEFAULT', 'index.php');.)
What happens is that it shows the correct results, but in a different page, with the old design. I don't understand it, because that link should take me to the same index.php that I modified, but obviously it's taking me somewhere else.
I don't know what page is it showing, the only thing I see is the link written by the PHP function:
(my_catalog_folder)/escaparate-c-24.html?sort=2a&osCsid=p7fp55t489nv042p0ip4mp7si1
I guess that the tep_href_link() is writing that, but I don't know what page is using to show the results.
Any clues would be much appreciated!
This is expected behaviour if the store has the SEO URLs module installed.
Look in the .htaccess file and you should spot this line:
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
Any and all requests for a category will be rewritten in a friendlier URL string like the one you noted.
As to the use of the older design, double-check the real file being called with an echo out of the $_SERVER["PHP_SELF"]; or $_SERVER["SCRIPT_NAME"]; and make sure the filename and path is correct.
Drop that into a file like includes/application_top.php before the final lines (or the closing ?> if you still have that there):
echo $_SERVER["SCRIPT_NAME"];
It may also be due to caching of the pages. Check to see if there a cache module installed as well.
Related
I hope someone here has used the Blink.jl package for building Julia and Electron apps.
I am having problems setting up and using it, though. The issue is with all of the functions in the api provided: load/loadcss/loadjs/importhtml. They do not seem to work, or I might be doing something wrong.
For example:
loadcss!(w, "styles.css")
does not apply any of the styles in the styles files in the directory.
importhtml!(w, 'index.html')
does not display the html page stored in the local directory. The app shows a blank screen.
I might be doing something wrong as i could not find documentation on how to use the package
I think I found out why, the methods take the full path and not the relative paths, even if files are inside the same folder. So, something like this works:
loadcss!(w, "D:\project\styles.css")
but this won't work:
loadcss!(w, "styles.css")
I am attempting to write a program that looks at the current browser you have open, goes through each tab, and copies and pastes each page's url into a notepad file.
I have no issue with writing the file; my main concern is that I can't find anything in any language that can look at the browser, sift through the tabs, and scrape the url.
Does anyone know if this would be possible, any code that might be able to help (in any language), or if something like this exists? I would appreciate anyone pointing me in the right direction.
The software I was looking for did not exist, so I created it. It's a chrome extension called Raincheck
Hi contao developer out there,
Anybody knows why the styling of the whole admin backend's missing.
I attach a screenshot, let me know if anyone knows something.
enter image description here
Looks like you have installled your Contao into a sub directory and setup your base url incorrect.
Have a look into system/config/pathconfig.php and verify the path is the same as in your browser (i.e. return ''; for an installation in the root dir and return '/some-dir'; for an installation in an subdir).
You should also check with web-developer tools as to which URLs for the Backend CSS it tries to load. Usually this already points out what in the base url is wrong.
Last thing, you might have set up some "strange" rewrite rules in your .htaccess file which may cause these problems.
Problem solved.
The fact that, the problem comes from the server configuration.
The Php process wasn't have enough permission, so it takes me some time to realise and knowing that I need to change the apache modul version to cgi/fpm mode.
This grants the php to recreate and generate the assets including js/css in asset folder. (at least from my own observation) and it works now.
My situation is the following:
I have an index.html and some JavaScript that loads HTML snippets from the server. Inside these snippets, I have some URLs to images like
/some/folder/picture.jpg
Of course these do not work in PhoneGap. Weinre tells me that PhoneGap is trying to load the picture from
file:///some/folder/picture.jpg
Any ideas how to solve this? I was thinking about something like a base href, or some configuration in PhoneGap where one could specify a root path, but I did not find anything like that ...
Thanks,
Michael
I had the same problem especially when you have a lot of views (pages) and want to load one from a menu, yet you are at an unknown location.
The simple work around is to use the window.location object.
window.location.href.split('www')[0] + 'www'
This gives you the absolute URL to your 'base'. The www is the folder which is relevant for IOS and Android, so this also makes your app compatible in multiple platforms.
From this you can use a regular expression which passes the entire doc like jquery mobile does with data-* attributes to describe their elements. You simply replace the regular expression with the path returned. You'll want to do this during initialisation otherwise it will create a massive bottle neck.
Hope this helps and is along the lines of what you're looking for.
Cheers,
Sententia
You can't do that with a <base> because / is always host-relative — it can't be redefined to be in a subdirectory. You have two options:
rewrite your HTML to use fully relative paths like ../../some/folder/picture.jpg (or have something do the rewrite for you as a build step), or
alter the "browser" (PhoneGap's wrapper) so that it loads URLs differently.
I'm not familiar with PhoneGap so I can't comment on automatic options, but I personally would start using relative URLs.
I have made a application and the logo appears on every page. All 3 of my layouts are copy and pasted to be identical. I have 2 partials linking to 2 pages in the same view folder and the logo works with one and doesn't with the other. It just displays the "alt" name of the <img>. Is there a way to fix this?
I'd suggest -and I apologise for this- that the obvious answer is that you're not correctly calling the image file.
Check the URI of the image -in the generated (x)html- to make sure that, in the finished page, it's pointing to the correct file. My own issues in these situations tend to be deleting a period (../image.png becomes ./image.png), a typo on the file type (image.png' asimage.pgp` -I don't know why) or some other typo-based issue.
I'm sorry I can't be more technical but those are, in my experience, the most common answers.